Looks like the best way to do it is to use the GenericDelegator but with a custom org.ofbiz.entity.util.SequenceUtil ...
On Sat, 2009-06-13 at 14:44 +0300, Deyan Tsvetanov wrote: > 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 >
