[
https://issues.apache.org/jira/browse/OFBIZ-9117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15672946#comment-15672946 ]
Paul Foxworthy commented on OFBIZ-9117:
---------------------------------------
Thanks Deepak. Does that mean we can now use entity-auto in the case of createInvoiceContactMech?
I don't expect entity-auto to handle every possible situation. I'd suggest we keep it simple and 80-20 rather than fiddle with it forever.
There's an error message if you try to push it too hard which lists what it can do:
"1. a single OUT pk for primary auto-sequencing, " +
"2. a single INOUT pk for primary auto-sequencing with optional override, " +
"3. a 2-part pk with one part IN (existing primary pk) and one part OUT (the secondary pk to sub-sequence), " +
"4. a N-part pk with N-1 part IN and one party OUT only (missing pk is a sub-sequence mainly for entity assoc), " +
"5. all pk fields are IN for a manually specified primary key");
So it can deliver one new id in an out parameter, but not more than one. I can live with that. For more complex situations, we can write a service rather than use entity auto.
> EntityAuto engine override the passed service in parameters
> -----------------------------------------------------------
>
> Key: OFBIZ-9117
> URL:
https://issues.apache.org/jira/browse/OFBIZ-9117> Project: OFBiz
> Issue Type: Bug
> Components: ALL COMPONENTS
> Affects Versions: Trunk
> Reporter: Deepak Dixit
> Attachments: errorlog.txt
>
>
> There is an bug in EntityAuto engine, it override the passed service in parameters.
> In createInvoiceForOrder service calls the createInvoiceContactMech to crate invoice contactMech for PAYMENT_LOCATION purpose (at line no 357). In case of SO it should use Company PAYMENT_LOCATION contactMech. It get the Company contactMechId correctly and set it createInvoiceContactMech service in context correctly, but system throws foreign key constraints error for incorrect contactMechId.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)