Oracle sequence & Autogenerated ID

Posts   
 
    
Mephyston
User
Posts: 6
Joined: 26-Jul-2006
# Posted on: 04-Aug-2006 11:00:21   

Hi,

I'm using Oracle's trigger and sequence way of generating Auto Increment field values with Adapter Template. (LLBLGEN 2.0)

But when I save and refetch my entity like this :

adapter.SaveEntity(MyEntity, true)

I have this error message :

The entity is out of sync with its data in the database. Refetch this entity before using this in-memory instance.

I try to use LLBLGEN documentation to fix the problem with :

<add key="OracleTriggerSequences" value="true" />

but the problem is'nt solve yet cry

Thx for help

Edit : I want to add that the SaveEntity() method works fine because the database is populated after the save.

sparmar2000 avatar
Posts: 341
Joined: 30-Nov-2003
# Posted on: 05-Aug-2006 16:40:57   

Hello

Edit : I want to add that the SaveEntity() method works fine because the database is populated after the save.

Do the problem still exist?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39613
Joined: 17-Aug-2003
# Posted on: 05-Aug-2006 20:49:18   

You have to set a sequence on the PK field in the designer, even though you use triggers!

Frans Bouma | Lead developer LLBLGen Pro
Mephyston
User
Posts: 6
Joined: 26-Jul-2006
# Posted on: 06-Aug-2006 14:28:02   

sparmar2000 wrote:

Do the problem still exist?

Yes cry

Otis wrote:

You have to set a sequence on the PK field in the designer, even though you use triggers!

I try to do that, but the check box is disable in the designer disappointed Do you know why is it disable ?

sparmar2000 avatar
Posts: 341
Joined: 30-Nov-2003
# Posted on: 06-Aug-2006 16:37:09   

Hi Mephyston

Is the field a numeric field?

Mephyston
User
Posts: 6
Joined: 26-Jul-2006
# Posted on: 07-Aug-2006 09:25:19   

sparmar2000 wrote:

Hi Mephyston

Is the field a numeric field?

No, this is a string field because we need to have this format :

XXXMMM000000001 XXXMMM000000002 XXXMMM000000003

Jessynoo avatar
Jessynoo
Support Team
Posts: 296
Joined: 19-Aug-2004
# Posted on: 07-Aug-2006 14:56:14   

Hi,

can you have a look at the following thread which is just about the same issue?

http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=7163

Hope it can help