Thanks all for your return :)

Jacques, I attach I comment on this Jira tomorow, (now is to late and I am very tired)

Nicolas
Jacques Le Roux a écrit :
Hi Nicolas,

Found that
https://issues.apache.org/jira/browse/OFBIZ-2567?focusedCommentId=12717246&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_12717246

Just a reference you could attach on...

Jacques

From: "Nicolas Malin" <malin.nico...@librenberry.net>
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/





--
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/

Reply via email to