It looks to me as though an exception is being logged rather than thrown, is the id still being generated?

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 24/12/2009, at 3:31 AM, Nicolas Malin wrote:

Hi all,

It's possible that this subject has been already discussed here but I don't find any trace in the archives.

A long time ago, I used delegator.getNextSeqId to use multiple sequences in an entity like invoice (SALES, PURCHASE, ...). Example : in France we use a sequence for all invoiceType and I call the delegator this way :
invoiceId = delegator.getNextSeqId("Invoice." + invoiceTypeId);
To have :
         for sales : VE10000, VE10001,  VE10002, ...
         for purchases : AC10000, AC10001,  AC10002, ...

Now when using this, GenericDelegator throws an exception : "Could not find definition for entity name Invoice.PURCHASE_INVOICE"

I checked the code (GenericDelegotor.java:3049 on trunk) and found  :
         // might be null, but will usually match the entity name
          ModelEntity seqModelEntity = this.getModelEntity(seqName);

I suppose that there are some reasons to check the seqName as an entityName but I don't understand why.

To manage many sequences for one entity, do you use directly the sequenceUtil ?

Is it possible to add an escape case before checking entity (as add test if we find a point) ? Or extend getNextSeqId to manage prefix/ suffix parameters ?

Nicolas

--
Nicolas MALIN
Consultant
Tél : 06.17.66.40.06
Site projet : http://www.neogia.org/
-------
Société LibrenBerry
Tél : 02.48.02.56.12
Site : http://www.librenberry.net/


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to