Login  Register

Re: Dev - Entity primary key generation

Posted by Si Chen-2 on May 09, 2006; 5:07pm
URL: http://ofbiz.116.s1.nabble.com/Dev-Entity-primary-key-generation-tp167902p167903.html

Yes, minilang already does this with sequenced-id-to-env, and there is
Java API GenericDelegator.getNextSeqId() as well.  It is based on what's
stored in SequenceValueItem.  Si

Antero Lukkonen wrote:

> Hello!
>
> First of all i would like to apologize if it's a stupid question, but i
> have not been able to find an answer by my self.
>
> Is it possible to generate a primary_key id automatically. Does ofbiz
> provide some standard method in minilang or by entity definition or do i
> have to write the method myself and assign the value returned prior to
> database insert to the object? The id would just be an unique
> identificator like a sequence in Postgres or auto_increment in mysql.
>
> Regards
> Antero Lukkonen
> Monit Solutions
> Estonia
>
>  
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
>
>
>  

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev