Re: Dev - Entity primary key generation
Posted by
Jacopo Cappellato on
May 09, 2006; 3:27pm
URL: http://ofbiz.116.s1.nabble.com/Dev-Entity-primary-key-generation-tp167902p167904.html
Hi Antero,
you can use the sequenced-id-to-env command:
<sequenced-id-to-env sequence-name="EntityName" env-name="newKeyId"/>
Jacopo
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