Oracle Sequence Numbers

Posts   
 
    
Posts: 11
Joined: 29-Mar-2005
# Posted on: 09-May-2005 16:29:04   

What is the best way to generate Oracle sequence numbers to work with LLBLGen Pro?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39617
Joined: 17-Aug-2003
# Posted on: 09-May-2005 19:21:30   

crazylittlemonkeys wrote:

What is the best way to generate Oracle sequence numbers to work with LLBLGen Pro?

Make them available in the schema you want to use them in, then they're loaded into the project automatically. You can then define which field is sequenced with which sequence in the llblgen pro designer, by opening an entity, by double clicking it in project explorer or right clicking it and selecting 'Edit/properties'.

Frans Bouma | Lead developer LLBLGen Pro
Posts: 11
Joined: 29-Mar-2005
# Posted on: 09-May-2005 20:24:42   

That's great...worked like a charm. Is there a way to automatically propogate the generated sequence number into child classes (tables) that have the id as a foreign key?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39617
Joined: 17-Aug-2003
# Posted on: 09-May-2005 22:31:55   

crazylittlemonkeys wrote:

That's great...worked like a charm. Is there a way to automatically propogate the generated sequence number into child classes (tables) that have the id as a foreign key?

Yes, if you associate the object to the PK side object. for example you have an Order object with a sequenced OrderID, and you add an OrderRow entity to Order.OrderRows, then, when Order is saved, it will automatically propagate its new OrderID to the OrderRow entities in its collection, or when Order is not new, it will immediately do that when OrderRow is added to Order.OrderRows simple_smile

Frans Bouma | Lead developer LLBLGen Pro