Page 1 of 1

Update Model From Database with Identity property

Posted: Wed 19 Oct 2011 14:04
by Rik
Hi,

Thanks to this article :

http://www.devart.com/blogs/dotconnect/ ... ggers.html

I can now use sequences in Entity Framework without triggers , with identity and default value.

But when I'm trying to update the model from the database , it always tell me that the primaries keys changed with this message:
(Identity(old=True, new=False))

Why this changes always appears in the list of changes ?

I hope I was understanding

Thanks

Posted: Thu 27 Oct 2011 15:24
by Shalex
We have reproduced the described behaviour.

The following condition will be added in the Update Model From Database wizard: if the column has StoreGeneratedPattern="Identity" (or "Computed") and DefaultValue="any_input_here", this will not mark its table as "Changed" (wizard won't update the table representation in the model). We will post here when the corresponding build of dotConnect for Oracle is available for download.

As a workaround, please uncheck such tables in the wizard.

Posted: Mon 31 Oct 2011 07:34
by Rik
Ok thank you :)

Posted: Fri 11 Nov 2011 16:32
by Shalex
New build of dotConnect for Oracle 6.50.244 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=22547 .

Posted: Mon 14 Nov 2011 10:16
by coeamyd
Hi Shalex,

I just installed the new dotConnect for Oracle build from friday, because I have been experiencing the same issues. After updating, I still get all columns I manually changed to Identity=true marked as changed. Do I have to update my complete model once, before the change takes effect, or has this behavior not been changed? I could not find any information about it in the release notes.

Thanks,
Christoph

Posted: Tue 15 Nov 2011 09:29
by Shalex
coeamyd wrote:I could not find any information about it in the release notes.
Please refer to http://www.devart.com/forums/viewtopic.php?t=22547, the Entity Developer section:
"Behaviour is changed: table is not marked as "Changed" in Update Wizard if DefaultValue is set for its expression column".
coeamyd wrote:After updating, I still get all columns I manually changed to Identity=true marked as changed.
1. Are you using Entity Developer (the Devart Entity Model template, *.edml)?
2. Have you set the DefaultValue attribute in the store part for your Identity column?

Posted: Tue 15 Nov 2011 16:03
by coeamyd
Thanks for the clarification. I had not set the DefaultValue attribute in the store part. Works like a charm now. Great work.