Hello,
A one to many association (Customer-Order) make's the Customer (the '1' side) the owner. In our case I associate a new Order to the Customer in a Customer maintenance screen. Before persisting, I send the Customer object to a java action to do some further calculations. (It is not really a Customer and an Order, but a complete different 1-* assoc. For simplicity I call it a Customer-Order).
In the generated java proxy's the Order can acces the Customer (association) directly from the order by for instance getorder_customer(). From the Customer proxy there is no method to get the set of Orders belonging to this Customer directly from the Customer proxy. For this we have to use the Core.retrieveByPath() functionality.
This is fine, but retrieves Orders from the database. But my Order is not persisted yet... In the Java action I'd like to get access to the Order object that is created in the screen, in memory, and which is not yet in the database. Just like the Customer object, which is passed as a page parameter to the java action.
So I thought to change the 'ownership', but if I start tweaking the association parameters (owner both, reference-referenceset), the association completely changes. In other words, It appears that I can't create a 1-* association where the 1 side is the owner.
Obviously I see the implictions if you would be able to retrieve the 'many' side with one getter (performance, I guess), but in my case this will never be more than 10 items.
Is there a way to pass the 'many' entiy(ies) together with the '1' entity to a java action?
(The real model is a financial entity (one) which is related to a limited but variable set of currency's (many). So for that reason there is no Order maintenance screen, which would make it a bit easier.)