Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calls to mt_immutable_timestampt/mt_immutable_timestamptz fail with duplicated fields #1378

Closed
cocowalla opened this issue Nov 4, 2019 · 2 comments

Comments

@cocowalla
Copy link
Contributor

Similar to #837, after upgrading Marten I'm getting the following error message when updating a type with a duplicated column:

schema "public" does not exist

I can see a statement being executed like:

update myschema.mt_doc_mytype as d set message_timestamp = public.mt_immutable_timestamptz(data -> 'Message' ->> 'Timestamp') where (d.tenant_id = :tenantid and d.id = :arg9)

^ Note the public.mt_immutable_timestamptz - also note that when creating my document store I am setting DatabaseSchemaName = myschema.

The problem seems to be here in DuplicatedField - a new, default StoreOptions is being created, instead of using the configured one.

@cocowalla
Copy link
Contributor Author

Will send a PR for this shortly

@stvoidmain
Copy link

stvoidmain commented Nov 5, 2019

Nice to see this worked out!
Letme know if you need help to try something.
(sorry for not coming up before, was on a very tight spot with work)

@oskardudycz oskardudycz added this to the 3.10.0 milestone Nov 5, 2019
oskardudycz pushed a commit that referenced this issue Nov 7, 2019
* fix: #1378, use configured StoreOptions

* Add back the original ctor, so no breaking change

* Revert laziness

* Add tests for #1378 fix

* Reverted change to test connection string

* Updated obsolete DuplicatedField constructor to use new one

* Formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants