Update Model From Database with Identity property

Update Model From Database with Identity property

Postby Rik » Wed 19 Oct 2011 14:04

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
Rik
 
Posts: 2
Joined: Wed 19 Oct 2011 13:53

Postby Shalex » Thu 27 Oct 2011 15:24

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.
Shalex
Devart Team
 
Posts: 7616
Joined: Thu 14 Aug 2008 12:44

Postby Rik » Mon 31 Oct 2011 07:34

Ok thank you :)
Rik
 
Posts: 2
Joined: Wed 19 Oct 2011 13:53

Postby Shalex » Fri 11 Nov 2011 16:32

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 .
Shalex
Devart Team
 
Posts: 7616
Joined: Thu 14 Aug 2008 12:44

Postby coeamyd » Mon 14 Nov 2011 10:16

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
coeamyd
 
Posts: 9
Joined: Fri 04 Nov 2011 14:59

Postby Shalex » Tue 15 Nov 2011 09:29

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?
Shalex
Devart Team
 
Posts: 7616
Joined: Thu 14 Aug 2008 12:44

Postby coeamyd » Tue 15 Nov 2011 16:03

Thanks for the clarification. I had not set the DefaultValue attribute in the store part. Works like a charm now. Great work.
coeamyd
 
Posts: 9
Joined: Fri 04 Nov 2011 14:59


Return to dotConnect for Oracle