[OFBiz] Dev - UniqueId field-type in GenericDelegator?
Adrian Crum
adrianc at hlmksw.com
Thu Sep 23 12:32:08 EDT 2004
David E. Jones wrote:
> One nice thing about this is that it would be possible to write a
> routine that finds a GenericValue by its unique ID by going through all
> entity definitions and finding those with a single PK that is a uniqueId
> type, and then doing a findByPrimaryKey on that entity to see if it
> matches, and return the first one it finds... Might be a nice way to
> validate certain things...
It seems to me that would be the method used by the unique value service
to insure that a new value is truly unique.
> On Sep 22, 2004, at 3:32 PM, Adam Heath wrote:
>
>> GenericDelegator has a feature, to get a serial number from a
>> SequenceValueItem. This is create, but produces easily-guessable
>> ever-increasing numbers.
>>
>> What I propose(and will implement), is an additional feature, that
>> allows for
>> unique-ids. An entity will be created to store these, and a new field
>> type
>> will be created as well. A second stage of development will
>> auto-create a
>> relation from each field that has this type, to the UniqueId entity
>> table.
>>
>> Also, a few sub tables could be used, to move unused uniqueids from
>> the active
>> table, into a pool. Or, just a semi-random combination of host-ip,
>> timestamp,
>> and sequence number should be used.
>>
>> Any thoughts on this?
>>
>> _______________________________________________
>> Dev mailing list
>> Dev at lists.ofbiz.org
>> http://lists.ofbiz.org/mailman/listinfo/dev
>
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> Dev mailing list
> Dev at lists.ofbiz.org
> http://lists.ofbiz.org/mailman/listinfo/dev
More information about the Dev
mailing list