Replies: 1 comment
-
above workaround is the only way for now, there's no functionality to add default id generation at the moment |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi guys,
Thanks for the wonderful package.
I have one small question. Is there any way to populate id automatically (on insert) if I have my own custom function to generate id?
So far I have read this and this.
I know I can create a new struct value and populate the id manually:
But maybe there is a way to tell REL to use my generator to populate the id on insert? So it would look like this:
Also I guess I can do this:
But I feel it is too noisy.
The only solution I can see is to provide an extension method:
However I am not sure how relation would work, when
Book
struct has anAuthor
field which is also a new value.Beta Was this translation helpful? Give feedback.
All reactions