You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there an example how to get the value of this generated ID in order to use it as the reference in the orderlines?
I know this can be done manually with
INSERT INTO Order(...) values(...) SELECT SCOPE_IDENTITY()
or "; SELECT last_insert_rowid()" for MSSql/Postgres
but maybe there is a more comfortable way?
And probably there is no other way than keep the ID as option, isn't it?
The text was updated successfully, but these errors were encountered:
I see this part is missing in the documentation so if you would @Slesa send a PR with some description for *OutputAsync methods, it may help others for next time.
Well I would like to, but... maybe it is because of monday, or I am too slow in thinking in general :)
When I use Order with Id set, I get the error 'Can not set explicit value on identity'. When I use an OrderDto w/o Id field, I cannot persist as it is a table of Orders, not OrderDtos. And I could not access the Id field anyway...
PS: @JordanMarr is right, the Id field cannot be optional
I bet it has sth to do with the Persons.View.generate in the tests somehow...
Consider an order with an auto ID field, which can have multiple orderlines.
Is there an example how to get the value of this generated ID in order to use it as the reference in the orderlines?
I know this can be done manually with
or "; SELECT last_insert_rowid()" for MSSql/Postgres
but maybe there is a more comfortable way?
And probably there is no other way than keep the ID as option, isn't it?
The text was updated successfully, but these errors were encountered: