create sequence and trigger by creating a primary key

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
joerid
Posts: 3
Joined: Thu 18 Nov 2010 07:50

create sequence and trigger by creating a primary key

Post by joerid » Thu 18 Nov 2010 16:38

Hi
I'm using devart dotConnect for Oracle (Beta Version 6.0). Is there a possibility to automatically generate a sequence and a trigger for a primary key property as you could do on an edmx model with ef4.0 designer ? do I need to change a text Template ? if yes which template ?
Thanks in advance
Nike

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 19 Nov 2010 09:03

Perform the following steps:
1. Set the StoreGeneratedPattern attribute to Identity for the autogenerated column in designer.
2. Set the DDL Generation Template property of the model to "Devart SSDLToOracle.tt"
3. Comment out the connection string in the application configuration file.
4. Run the Generate Model From Database wizard.
5. Provide a valid Oracle connection in the wizard (this step is necessary because of the step 3. If you don't comment out the connection string the template is applied incorrectly).

joerid
Posts: 3
Joined: Thu 18 Nov 2010 07:50

create sequence and trigger by creating a primary key

Post by joerid » Fri 19 Nov 2010 09:48

Hi
We are using the devart entity developer which is part of the DotConnect 6.0. We like to use this tool because of the update database capabilities.
conidtions:
We have an edml model.
We are using oracle 11gR2
Model first approach
If we define an entity with an id (StoreGeneratedPattern attribute to Identity) we getting the following result:
CREATE TABLE "comit_bto"."Rolfs" (
"Id" NUMBER(9) NOT NULL AUTO_INCREMENT,
CONSTRAINT "PK_Rolfs" PRIMARY KEY ("Id")
);
What we doing wrong ?
Where can we set the Set the DDL Generation Template property of the model to "Devart SSDLToOracle.tt"
Thanks in advance
Nike

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 19 Nov 2010 14:00

Thank you for the report, we are already aware of this problem.
I will let you know as soon as it is fixed.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 21 Feb 2011 16:08

We have added trigger and sequence generation for columns with StoreGeneratedPattern set to Identity for Devart Entity models as well.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 24 Feb 2011 15:10

We have released a new 6.10.111 build of dotConnect for Oracle including the sequence and trigger generation.
You can download this build from here (Trial edition).
If you are a registered user, you can get the non-Trial edition from Registered Users' Area.
Detailed information about this build is available here.

Konamiman
Posts: 8
Joined: Tue 29 Mar 2011 16:13
Location: Mallorca, Spain
Contact:

Post by Konamiman » Tue 25 Oct 2011 07:42

This doesn't seem to work on version 6.50.228...

I have a table with a column marked as entity key, and its "IdGenerator" property (there is no "StoreGeneratedPattern" property) is set to Identity. When updating database from model the table is created, but there is no sequence nor trigger created.

That's strange because I remember having indeed seen this functionality working in the past, using older versions of dotConnect for Oracle.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Wed 26 Oct 2011 10:03

We couldn't reproduce the issue in our environment. If possible, please send us a model with which you encounter this problem.

JIC: the IdGenerator property is used in LinqConnect models, and StoreGeneratedPattern provides the analogous functionality for Entity Framework models.

Post Reply