Unable to create identity on duplicated field. #1776
Unanswered
ushenkodmitry
asked this question in
Q&A
Replies: 2 comments 2 replies
-
@ushenkodmitry That's redundant anyway. The identity is always separated into an "id" field in the document tables, and becomes your primary key. Also redundant because Marten automatically makes the "Id" property or field the identity member. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Wihout setting identity column explicitly with Identity method this code
throws exception. Don't remember what type exactly, but the message informs
me that the type does't have identity column configured.
вс, 21 мар. 2021 г., 17:54 Jeremy D. Miller ***@***.***>:
… @ushenkodmitry <https://github.com/ushenkodmitry> That's redundant
anyway. The identity is always separated into an "id" field in the document
tables, and becomes your primary key. Also redundant because Marten
automatically makes the "Id" property or field the identity member.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1776 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD7NMH7RF5VZ64T3KDDTRRDTEYCBVANCNFSM4ZRUHARQ>
.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I don't know if it's bug or not. And I can't find any information on this.
When I use duplicate field as identity Marten doesn't generate a column for that field in table creation DDL. Is this a bug, or this is by design?
The code I use is simple
Marten doesn't generate column in table but generates scrip for index creation on that field. As result I'm catching PostgresException.
Beta Was this translation helpful? Give feedback.
All reactions