the problem is not in the Entity, since they are already id-ne for ID's
but the code that gets the next ID number.

I believe you are thinking in Database terms where the you can specify
the type on increment. Ofbiz does not use such database features.

David mentioned a away to accomplish this so maybe he will respond on
this one.


Deyan Tsvetanov sent the following on 6/13/2009 4:44 AM:
> Hi list, 
> 
> I'd like to use a custom ID generator - for instance rather to start
> from 10000 and increment by 10 I'd like to start from 0, increment by 1
> leaving no empty values and probably append some other rules - like to
> reset to 0 in the beginning of each year and prefix the returned ID by
> the current year. 
> 
> Example: 
> 
>  200900001
>  200900002
>  ....
>  200932110
>  ....
>  201000001    <--- a new year starts.
> 
> I know it may sound pretty dumb, but the law makers in some countries
> are not so smart. 
> 
> So - could somebody give me some hints - is it possible to specify a
> custom ID generator per field typed "id-ne" in the entitymodel.xml ?
> 
> Thanks in advance, 
> Deyan 
> 
> 

-- 
BJ Freeman
http://www.businessesnetwork.com/automation
http://bjfreeman.elance.com
http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro
Systems Integrator.

Reply via email to