Mapping one to many

I spoke about this in another thread. however, it was not the main topic of the thread so I thought I should start a thread dedicated to this issue.
As you can see I have a loop connecting three fields on the left side of my map to the AMT parent on the right. I need an AMT segment on the right for each of the fields on the left. Note that the line on the left only appears once. The left side does not loop.
See my pic below:
If I remove the loop they get stacked like this:
<AMT_ClaimSupplementalInformation>
AMT01
AMT01
AMT01
AMT02
AMT02
AMT02
AMT03
AMT03
AMT03
</AMT_ClaimSupplementalInformation>
It should look like this:
<AMT_ClaimSupplementalInformation> ---- for CDISCOUNT
AMT01
AMT02
</AMT_ClaimSupplementalInformation>
<AMT_ClaimSupplementalInformation> ---- for CELIGIBLE
AMT01
AMT02
</AMT_ClaimSupplementalInformation>
<AMT_ClaimSupplementalInformation> ---- for CALLOWED
AMT01
AMT02
</AMT_ClaimSupplementalInformation>
I can't set the loop at the TOTAL level on the left side because the TOTAL line only occurs once. There has to be an easy remedy to this, but it certainly is eluding me. I've even tried the table looping and table extractor functoids. That only made things
worse :)
Hope you guys have some input as this has me completely stumped.
Thanks.

I validated the map and loaded the XSLT up in visual studio. I'll have to say, I'm not sure why I haven't done this more often in the past as it is very helpful. While running it in debug mode I get to the section that creates the AMT segment and I notice
that it runs the entire section once for each claim in the file. So if the are three claims in the file, it run the section three times for each claim. Obviously, I only want it to run the section once per claim. I have a question regarding the XSLT. I do
not have a loop attached to the TOTALS line, yet there is a <xsl:for-each select="../Totals"> line at the top of the section. Is this normal even when there is no loop attached in the mapper? I tried removing the for-each around the section
but that created a bunch of empty sections.
Thanks.
[EDIT] Just realized I had a loop attached to the three individual fields, not the parent(TOTALS). I remember now that I tried this because without the loop the child nodes for all three sections got stacked under a single parent node. Interesting how it shows
up in the XSLT.

Similar Messages

  • OR mapping one-to-many with the movie EJB application

    Hi,
    I have downloaded from Orion the Movie EJB application with
    OR mapping one-to-many.
    When I ran it, it's fine. But I have spurious messages on
    my OC4J LOG:
    Oracle9iAS (9.0.2.0.0) Containers for J2EE initialized
    java.lang.Exception
    at MovieHome_EntityHomeWrapper53.getLazyInstance(MovieHome_EntityHomeWrapper53.java:219)
    at Movie_ORCollection29.getObjects(Movie_ORCollection29.java:43)
    at com.evermind.server.ejb.ORCollection.size(ORCollection.java:42)
    at java.util.ArrayList.<init>(ArrayList.java:125)
    at com.evermind.server.ejb.ORCollection.getReplacement(ORCollection.java:22)
    at Director_EntityBeanWrapper1.getMovies(Director_EntityBeanWrapper1.java:1318)
    at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at MovieHome_EntityHomeWrapper53.getLazyInstance(MovieHome_EntityHomeWrapper53.java:219)
    at Movie_ORCollection29.getObjects(Movie_ORCollection29.java:43)
    at com.evermind.server.ejb.ORCollection.size(ORCollection.java:42)
    at java.util.ArrayList.<init>(ArrayList.java:125)
    at com.evermind.server.ejb.ORCollection.getReplacement(ORCollection.java:22)
    at Director_EntityBeanWrapper1.getMovies(Director_EntityBeanWrapper1.java:1318)
    at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at DirectorHome_EntityHomeWrapper28.getLazyInstance(DirectorHome_EntityHomeWrapper28.java:207)
    at Movie_EntityBeanWrapper3.loadState(Movie_EntityBeanWrapper3.java:1575)
    at Movie_EntityBeanWrapper3.getTitle(Movie_EntityBeanWrapper3.java:1374) at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at DirectorHome_EntityHomeWrapper28.getLazyInstance(DirectorHome_EntityHomeWrapper28.java:207)
    at Movie_EntityBeanWrapper3.loadState(Movie_EntityBeanWrapper3.java:1575)
    at Movie_EntityBeanWrapper3.getTitle(Movie_EntityBeanWrapper3.java:1374) at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    Auto-unpacking /u00/app/oracle/product/9i/j2ee/home/applications/MovieDatabase.ear... done.
    Auto-unpacking /u00/app/oracle/product/9i/j2ee/home/applications/MovieDatabase/MovieDatabaseWebClient.war... done.
    Auto-deploying MovieDatabaseBeans.jar (Class 'moviebeans.Actor' had been updated)... done.
    java.lang.Exception
    at ActorHome_EntityHomeWrapper9.getLazyInstance(ActorHome_EntityHomeWrapper9.java:207)
    at MovieActorJuncture_ORCollection10.getObjects(MovieActorJuncture_ORCollection10.java:49)
    at com.evermind.server.ejb.ORCollection.size(ORCollection.java:42)
    at moviebeans.ActorBean.getMovies(Unknown Source)
    at Actor_EntityBeanWrapper4.getMovies(Actor_EntityBeanWrapper4.java:983) at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at MovieHome_EntityHomeWrapper57.getLazyInstance(MovieHome_EntityHomeWrapper57.java:219)
    at MovieActorJuncture_ORCollection10.getObjects(MovieActorJuncture_ORCollection10.java:69)
    at com.evermind.server.ejb.ORCollection.size(ORCollection.java:42)
    at moviebeans.ActorBean.getMovies(Unknown Source)
    at Actor_EntityBeanWrapper4.getMovies(Actor_EntityBeanWrapper4.java:983) at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at MovieActorJunctureHome_EntityHomeWrapper39.getLazyInstance(MovieActorJunctureHome_EntityHomeWrapper39.java:216)
    at MovieActorJuncture_ORCollection10.getObjects(MovieActorJuncture_ORCollection10.java:86)
    at com.evermind.server.ejb.ORCollection.size(ORCollection.java:42)
    at moviebeans.ActorBean.getMovies(Unknown Source)
    at Actor_EntityBeanWrapper4.getMovies(Actor_EntityBeanWrapper4.java:983) at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at DirectorHome_EntityHomeWrapper32.getLazyInstance(DirectorHome_EntityHomeWrapper32.java:207)
    at Movie_EntityBeanWrapper7.loadState(Movie_EntityBeanWrapper7.java:1575)
    at MovieHome_EntityHomeWrapper57.findExistingEntity(MovieHome_EntityHomeWrapper57.java:108)
    at MovieHome_EntityHomeWrapper57.activateEntity(MovieHome_EntityHomeWrapper57.java:157)
    at MovieHome_EntityHomeWrapper57.findByPrimaryKey(MovieHome_EntityHomeWrapper57.java:359)
    at MovieHome_EntityHomeWrapper57.getEJBObject(MovieHome_EntityHomeWrapper57.java:213)
    at com.evermind.server.ejb.EntityHandle.getEJBObject(EntityHandle.java:53)
    at com.evermind.server.ejb.EJBInputStream.resolveObject(EJBInputStream.java:41)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:405)
    at java.io.ObjectInputStream.inputArray(ObjectInputStream.java:1148)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:380)
    at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2268)
    at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:525)
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1417)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:392)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:242)
    at com.evermind.server.ejb.EJBUtils.cloneObject(EJBUtils.java:346)
    at Actor_EntityBeanWrapper4.getMovies(Actor_EntityBeanWrapper4.java:1075)
    at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at DirectorHome_EntityHomeWrapper32.getLazyInstance(DirectorHome_EntityHomeWrapper32.java:207)
    at Movie_EntityBeanWrapper7.loadState(Movie_EntityBeanWrapper7.java:1575)
    at Movie_EntityBeanWrapper7.getTitle(Movie_EntityBeanWrapper7.java:1374) at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    Auto-unpacking /u00/app/oracle/product/9i/j2ee/home/applications/MovieDatabase.ear... done.
    java.lang.Exception
    at ActorHome_EntityHomeWrapper9.getLazyInstance(ActorHome_EntityHomeWrapper9.java:207)
    at MovieActorJuncture_ORCollection10.getObjects(MovieActorJuncture_ORCollection10.java:49)
    at com.evermind.server.ejb.ORCollection.size(ORCollection.java:42)
    at moviebeans.ActorBean.getMovies(Unknown Source)
    at Actor_EntityBeanWrapper4.getMovies(Actor_EntityBeanWrapper4.java:983) at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at MovieHome_EntityHomeWrapper57.getLazyInstance(MovieHome_EntityHomeWrapper57.java:219)
    at MovieActorJuncture_ORCollection10.getObjects(MovieActorJuncture_ORCollection10.java:69)
    at com.evermind.server.ejb.ORCollection.size(ORCollection.java:42)
    at moviebeans.ActorBean.getMovies(Unknown Source)
    at Actor_EntityBeanWrapper4.getMovies(Actor_EntityBeanWrapper4.java:983) at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at MovieActorJunctureHome_EntityHomeWrapper39.getLazyInstance(MovieActorJunctureHome_EntityHomeWrapper39.java:216)
    at MovieActorJuncture_ORCollection10.getObjects(MovieActorJuncture_ORCollection10.java:86)
    at com.evermind.server.ejb.ORCollection.size(ORCollection.java:42)
    at moviebeans.ActorBean.getMovies(Unknown Source)
    at Actor_EntityBeanWrapper4.getMovies(Actor_EntityBeanWrapper4.java:983) at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at DirectorHome_EntityHomeWrapper32.getLazyInstance(DirectorHome_EntityHomeWrapper32.java:207)
    at Movie_EntityBeanWrapper7.loadState(Movie_EntityBeanWrapper7.java:1575)
    at MovieHome_EntityHomeWrapper57.findExistingEntity(MovieHome_EntityHomeWrapper57.java:108)
    at MovieHome_EntityHomeWrapper57.activateEntity(MovieHome_EntityHomeWrapper57.java:157)
    at MovieHome_EntityHomeWrapper57.findByPrimaryKey(MovieHome_EntityHomeWrapper57.java:359)
    at MovieHome_EntityHomeWrapper57.getEJBObject(MovieHome_EntityHomeWrapper57.java:213)
    at com.evermind.server.ejb.EntityHandle.getEJBObject(EntityHandle.java:53)
    at com.evermind.server.ejb.EJBInputStream.resolveObject(EJBInputStream.java:41)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:405)
    at java.io.ObjectInputStream.inputArray(ObjectInputStream.java:1148)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:380)
    at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2268)
    at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:525)
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1417)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:392)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:242)
    at com.evermind.server.ejb.EJBUtils.cloneObject(EJBUtils.java:346)
    at Actor_EntityBeanWrapper4.getMovies(Actor_EntityBeanWrapper4.java:1075)
    at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    java.lang.Exception
    at DirectorHome_EntityHomeWrapper32.getLazyInstance(DirectorHome_EntityHomeWrapper32.java:207)
    at Movie_EntityBeanWrapper7.loadState(Movie_EntityBeanWrapper7.java:1575)
    at Movie_EntityBeanWrapper7.getTitle(Movie_EntityBeanWrapper7.java:1374) at webclient.MovieDatabaseServlet.processQueryRequest(Unknown Source)
    at webclient.MovieDatabaseServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)

    For EntityOne and EntityTwo you can just define a normal OneToMany mapping using the foreign key.
    Are you using JPA, or the TopLink API? JPA requires a mappedBy for the OneToMany, so this may be more difficult. You should be able to just add a JoinColumn on the OneToMany and make the column insertable/updateable=false.
    For the attachment, you could either map the foreign key as a Basic (DirectToFieldMapping) and maintain it in your model, or use a VariableOneToOne mapping in TopLink (this will require the entities share a common interface).
    James : http://www.eclipselink.org : http://en.wikibooks.org/wiki/Java_Persistence

  • Message mapping: one as many, function node

    hi
    how to use - one as many - function node in mapping. i want to mapping one value from source structure to many fields in target structure. but i dont know the exact functionality of - one as many -
    kindly solve my issue
    regards
    mano

    Hi,
    Check out this example from SAP, which demos the use of the function oneAsMany:
    [http://help.sap.com/saphelp_nw04/helpdata/en/38/85b142fa26c811e10000000a1550b0/frameset.htm]
    Hope this helps,
    Sumant.

  • Need help mapping one-to-many relationship

    [Sorry, inadvertently cross-posted]
    Hello,
    I have a one-to-many mapping question that's probably a no-brainer for the
    experts of the group out there. My problem is that I can't get a collection
    of Items for a given Theme to be populated and I don't know if it's a
    problem in my system.jdo or in my classes (or both). For example, for Theme
    10,
    I want a collection of two Items, item_ids 1 and 2.
    I have db tables named ITEM and THEME with the following layouts:
    ITEM
    |==========================================================|
    | item_id(pk) | item_name | item_number | theme_id(fk) |
    |==========================================================|
    | 1 | This is Item1 | 1234 | 10 |
    | 2 | This is Item2 | 2954 | 10 |
    | 3 | This is Item3 | 2094 | 17 |
    | 4 | This is Item4 | 946 | 11 |
    | ... |
    |==========================================================|
    THEME
    |=======================================|
    | theme_id(pk) | theme_description |
    |=======================================|
    | 4 | Space |
    | 10 | Town |
    | 11 | Train |
    | 17 | Pirate |
    | ... |
    |=======================================|
    I have two PersistenceCapable classes that map to the above tables:
    package com.lego.data;
    public class Item
    public int item_id;
    private String item_number;
    private String item_name;
    private int theme_id;
    public Theme theme;
    public String toString()
    return
    item_number+":"+item_name+":"+theme.getCode()+":"+theme.getDescription();
    package com.lego.data;
    import java.util.*;
    public class Theme
    public int theme_id;
    public String theme_description;
    public Collection items;
    public String toString()
    return theme_id+":"+theme_description;
    and here is my system.jdo file:
    <?xml version = "1.0" encoding = "US-ASCII"?>
    <jdo>
    <package name="com.lego.data">
    <class name="Item" identity-type="application"
    objectid-class="com.lego.data.IntOId">
    <extension vendor-name="kodo" key="table" value="item"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <field name="item_id" primary-key="true">
    <extension vendor-name="kodo" key="data-column" value="item_id"/>
    </field>
    <field name="item_number">
    <extension vendor-name="kodo" key="data-column" value="item_number"/>
    </field>
    <field name="item_name">
    <extension vendor-name="kodo" key="data-column" value="item_name"/>
    </field>
    <field name="theme_id">
    <extension vendor-name="kodo" key="data-column" value="theme_id"/>
    </field>
    <field name="theme">
    <extension vendor-name="kodo" key="theme_id-data-column"
    value="theme_id"/>
    </field>
    </class>
    <class name="Theme" identity-type="application"
    objectid-class="com.lego.data.ThemeKey">
    <extension vendor-name="kodo" key="table" value="theme"/>
    <extension vendor-name="kodo" key="lock-column" value="none"/>
    <extension vendor-name="kodo" key="class-column" value="none"/>
    <field name="theme_id" primary-key="true">
    <extension vendor-name="kodo" key="data-column" value="theme_id"/>
    </field>
    <field name="theme_description">
    <extension vendor-name="kodo" key="data-column"
    value="theme_description"/>
    </field>
    <field name="items">
    <collection element-type="Item"/>
    <extension vendor-name="kodo" key="inverse" value="theme"/>
    </field>
    </class>
    </package>
    </jdo>
    Thanks in advance for the help.
    -Tim

    Abe White wrote:
    The first thing to check is that you are always setting the "theme" field in
    your Items. If you add an Item i to the "themes" collection of a Theme t, but
    forget to also set i's "theme" field to t, then the change will never get
    written to the database.
    Next, make sure that whenever you set the "theme" field of an Item, you also
    set
    its "theme_id" field. You map both of these fields to the same column, so you
    better be sure they stay in synch.
    On a related note, you might try making the "theme_id" field non-persistent if
    things still aren't working for you. Mapping two fields to the same column
    might be causing trouble. It would be safer to make theme_id non-persistent
    anyway, and to always grab the id from the Theme stored in your "theme"
    field.
    Better OO programming and all that, though I can see that you might have
    performance issues in mind when doing it your way.
    Anyway, if you find that it works when you make theme_id nonpersistent, let us
    know and we'll see why the double-mapping of the column is causing problems,
    and hopefully find a fix.Abe,
    Thanks for the response but I'm still confused. I failed to mention that
    the Item and Theme tables are in an existing schema, so as you saw in my
    system.jdo, I am specifying application identity.
    Since this is an existing schema, the Item table has theme_id as the
    foreign key to the Theme table. So are saying that it is a problem to map
    the both theme_id as a data column and a Theme object in the Item at the
    same time?
    I guess what I don't understand is exactly what my system.jdo should look
    like to map a one-to-many relationship. In my case, from Theme (1) to Item
    (many). (See my system.jdo in previous post).
    Thanks
    -Tim

  • PI 7.1 Operation mapping - Multiple message mapping - one to many issue

    Dear Experts,
    I am facing this issue in PI 7.1 and I beleive i did similar one in PI 7.0 successfully.
    I have an operation mapping with two message mappings.
    The occurence of source message of operation mapping is 1
    The occurence of target message of operation mapping is 0..unbounded
    Corresponding i configured two message mappings
    For message mapping-1
    Source message occurence = 1  and Target message occurence = 1
    For message mapping-2
    Source message occurence = 1  and Target message occurence = 0...unbounded
    When i test message mappings individually they are working good. But when i test it in operation mapping, the operation mapping is not working..as it is not able to convert single occurence output of message mapping -1 to the second message mapping-2.
    Any suggestions?
    Thanks.

    The message that i get when testing in operation mapping:
    Runtime Exception when executing application mapping program com/sap/xi/tf/_MM_MessageMapping_1_; Details: com.sap.aii.mappingtool.tf7.IllegalInstanceException; Cannot create target element /ns0:MT_MessageMapping_1_TargetMessageType/RECORDSET. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD
    My question is, has somebody mapped similar scenario in your environment? If yes, can you please provide details.
    Operation mapping :  1 to 0..unbounded
    Message Mapping1: 1 to 1
    Message Mapping2: 1 to 0...unbounded

  • One to many mapping problem

    In my JPA project I'm using these three classes:
    Cart.java:
    package com.spinnaker.pedja;
    import java.sql.Date;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.HashSet;
    import java.util.Set;
    import javax.persistence.*;
    @Entity(name = "Cart")
    @Table(schema = "shop")
    public class Cart {
         @Id
         @Column(name = "cart_id")
         private int Cart_id;
         @Column(name = "cart_date")
         private Date date;
          @OneToMany(mappedBy = "cartItemPK", targetEntity = CartItemPK.class)
          private Set cartitemCollection = new HashSet(0);
         @ManyToOne
         @JoinColumn(name = "customer_id")
         private Customer customer;
         public Customer getCustomer() {
              return customer;
         public void setCustomer(Customer customer) {
              this.customer = customer;
         public Cart() {
          public Set getCartitemCollection() {
          return cartitemCollection;
          public void setCartitemCollection(Set cartitemCollection) {
          this.cartitemCollection = cartitemCollection;
         public int getCart_id() {
              return Cart_id;
         public void setCart_id(int cart_id) {
              this.Cart_id = cart_id;
         public Date getDate() {
              return date;
         public void setDate(Date date) {
              this.date = date;
    }, CartItem.java:
    package com.spinnaker.pedja;
    import java.io.Serializable;
    import javax.persistence.*;
    @Entity
    @Table(schema = "shop")
    public class CartItem implements Serializable {
         @EmbeddedId
         @ManyToOne
    //     @JoinColumn(name = "cart_id")
         CartItemPK cartItemPK;
         @Column(name = "quantity")
         private int quantity;
         @Column(name = "unit_price")
         private double unit_price;
    //     @JoinColumn(name = "cart_id")
    //     private Cart cart;
    //      public Cart getCart() {
    //      return cart;
    //      public void setCart(Cart cart) {
    //      this.cart = cart;
         public CartItem() {
         public CartItemPK getCartItemPK() {
              return cartItemPK;
         public void setCartItemPK(CartItemPK cartItemPK) {
              this.cartItemPK = cartItemPK;
         public int getQuantity() {
              return quantity;
         public void setQuantity(int quantity) {
              this.quantity = quantity;
         public double getUnit_price() {
              return unit_price;
         public void setUnit_price(double unit_price) {
              this.unit_price = unit_price;
    }and CartItemPK.java:
    package com.spinnaker.pedja;
    import java.io.Serializable;
    import javax.persistence.*;
    @Table(schema="shop")
    @Embeddable
    public class CartItemPK implements Serializable{
         @Column(name="item_id",nullable=false)
         private int itemId;
    //     @ManyToOne
    //     @JoinColumn(name = "cart_id")
    //     private Cart cart;
         @Column(name="cart_id",nullable=false)
         private int cartId;
         public int getItemId() {
              return itemId;
         public void setItemId(int itemId) {
              this.itemId = itemId;
         public int getCartId() {
              return cartId;
         public void setCartId(int cartId) {
              this.cartId = cartId;
    I'm having problem with mapping one to many relationship between Cart and CartItem.I had to introduce CartItemPK class because CartItem has composite primary key.Help please!!!

    In my test class I'm using this code:
    Cart cart=em.find(Cart.class, 33);
              Set cartItems=cart.getCartitemCollection();
              for (Iterator iterator = cartItems.iterator(); iterator.hasNext();) {
                   CartItem cart_item = (CartItem) iterator.next();
                   System.out.println(cart_item.getCartItemPK().getCartId());
              }and this error happens:
    Exception in thread "main" javax.persistence.PersistenceException: org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class: com.spinnaker.pedja.Cart.cartitemCollection[com.spinnaker.pedja.CartItemPK]
         at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:247)
         at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:120)
         at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:159)
         at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:95)
         at com.spinnaker.pedja.test.Test.main(Test.java:30)
    Caused by: org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class: com.spinnaker.pedja.Cart.cartitemCollection[com.spinnaker.pedja.CartItemPK]
         at org.hibernate.cfg.annotations.CollectionBinder.bindManyToManySecondPass(CollectionBinder.java:979)
         at org.hibernate.cfg.annotations.CollectionBinder.bindStarToManySecondPass(CollectionBinder.java:530)
         at org.hibernate.cfg.annotations.CollectionBinder$1.secondPass(CollectionBinder.java:471)
         at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:43)
         at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1136)
         at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:296)
         at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1121)
         at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1211)
         at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:154)
         at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:847)
         at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:178)
         at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:235)
         ... 4 more
    I didn't find any example on the internet about my particular case.In the database,Cart and CartItem are conected via cart_id field.But in my JPA project,cart_id field is a part of a composite key CarItemPK.

  • 3 way one-to-many through a single link table

    I have 3 tables that are linked through one to many relationships in a single link table. Here's the real relationships:
    assay(id)
    multiplex(id, assays)
    markerset(id, assays, multiplexes)
    Here's the database schema:
    assay(id, name)
    markerset(id, name)
    multiplex(id, name)
    assay_marker_set(assay_id[not null], marker_set_id[not null], multiplex_id[nullable])
    I've mapped one-to-many relationships between markersets and assays, and multiplexes and assays, and BOTH of these one-to-manys need to be writable. In the record creation process, assays are associated with markersets, and then assays are associated with multiplexes, which in turn are associated with markersets.
    Here's our dilemma. When committing multiplexes through a unit of work, the one-to-many with assays can't see the one-to-many with markersets, so the commit fails because the markerset key is null.
    We've gotten around the problem by creating a postSave() method in markerset that writes multiplex changes once they are created. But again, in a unitofwork commit, saving a markerset fires the postSave() method, which writes assays and multiplexes that have not yet been written to the database.
    We've gotten around THAT by only turning on postSave() when creating multiplexes, not when associating assays with markersets.
    My question is, is there a more conventional approach to this problem? Clearly, the database needs to be reworked, but time constraints and the quantity of data to be curated makes changing the schema impossible. Or have we arrived at the most sensible solution to a ridiculous problem? Currently what we have works, it's just incredibly complicated, and nearly unmaintainable.
    Thanks for the time to even read this post, and mocking is permitted ;-)
    Paul Cooper
    GlaxoSmithKline US Bioinformatics

    Looks like your object model does not match your data model.
    From you object model you seem to have,
    Assay
    MarkerSet 1-m Assay, 1-m Multiplex
    Multiplex 1-m Assay
    From your data model you have,
    Assay 1-m AssayMarkerSetAssociation
    MarkerSet 1-m AssayMarkerSetAssociation
    Multiplex 1-m AssayMarkerSetAssociation
    AssayMarkerSetAssociation 1-1 Assay, 1-1 MarkerSet, 1-1 Multiplex
    (your object model seems to be also missing the name)
    I'm not exactly sure how you have your mapping working, but it would seem the best solution is to introduce an AssayMarkerSetAssociation object into your object model.
    If you do not wish to use this object in your model, you could just use it internally to store the relationship and still have get/set methods for the relationships that you want that initialize themselves from the associations.
    So your object model would be,
    Assay
    MarkerSet 1-m AssayMarkerSetAssociation (+ getAssays, getMultiplexes methods)
    Multiplex 1-m AssayMarkerSetAssociation (+ getAssays, method)
    AssayMarkerSetAssociation 1-1 Assay, 1-1 MarkerSet, 1-1 Multiplex
    In general you seem to be able to get your mapping working without changing your object model, but are probably better off for maintainability to change your model slightly.

  • Replicated Partition: One to many?

    I am hoping to set up a replicated partition, which will take exchange rate data from source to multiple targets.The issue is that I have multiple homes in any given target database for (eg) USD rate. ie I have tried using UDA's, but one USD tagged member in source, has multiple USD tagged members in target, hence partition doesnt verify.In short, can I map one to many, source to target in a replicated partition?Thanks in Advance

    Are you mapping from one outline to many outlines by using the same member in the source outline to couple different target outlines? If your answer is yes, then yes you can do it. ---Message Posted by kmooney ??3/19/02 07:16---I am hoping to set up a replicated partition, which will take exchange rate data from source to multiple targets.The issue is that I have multiple homes in any given target database for (eg) USD rate. ie I have tried using UDA's, but one USD tagged member in source, has multiple USD tagged members in target, hence partition doesnt verify.In short, can I map one to many, source to target in a replicated partition?Thanks in Advance

  • One to Many relationship in CMP

    Hi,
    How to create CMP entity bean that can map One To Many relationship?
    Thanks.
    (Actually, i have post this question in "Java programming" forum becoz i couldn't find the EJB link in forum main page...)

    Hello Friend,
    Go carefully through the RosterApp example in the J2EE tutorial.
    It sure is going to help you.
    See each and every tab and the values in the deployment tool.
    Best of Luck

  • Many Portal users mapping one R/3 user and query their own data ?

    Hi everyone :
      I want to discuss a issue as follow with all :
      Precondition : The SSO had done between Portal and R/3.
      Issue : Many Portal user(vendor) mapping one R/3 user(pulic vendor user),when they logon Portal, they can query the report, but the data was for the vendor logon now !
      Any discuss is welcome!
      Best Regards,
      Jianguo Chen

    Hi everyone :
      I want to discuss a issue as follow with all :
      Precondition : The SSO had done between Portal and R/3.
      Issue : Many Portal user(vendor) mapping one R/3 user(pulic vendor user),when they logon Portal, they can query the report, but the data was for the vendor logon now !
      Any discuss is welcome!
      Best Regards,
      Jianguo Chen

  • One to many mapping

    Having trouble with the following poblem.. specially how to code getChildren??????? Help urgent
    Create a class called Families which creates a one-to-many mapping of parent name (String) to Child objects. Create any needed member variables and write the two specified methods. (You do not need to write the Child class.)
    class Families {
    public void addToFamily( String parent, Child child) {
    public List getChildren( String parent) {
    I have done the following..
    import java.util.ArrayList;
    import java.util.List;
    class Families {
    private String parentName;
    List <child> children = new ArrayList();
    public Families(String name){
    this.parentName = name;
    public void addToFamily( String parent, child kid) {
    Families f = new Families(parent);
         f.children.add(kid);      
    public List<child> getChildren( String parent) {
         return this.children;
    }

    Having trouble with the following poblem.. specially
    how to code getChildren??????? Help urgent
    Create a class called Families which creates a
    one-to-many mapping of parent name (String) to Child
    objects. Create any needed member variables and write
    the two specified methods. This key:
    (You do not need to write the Child class.)How can the following line possibly work?
    List <child> children = new ArrayList();It's not syntactically correct, AND you're not writing the Child class.
    %

  • JPA One-To-Many Parent-Child Mapping Problem

    I am trying to map an existing legacy Oracle schema that involves a base class table and two subclass tables that are related by a one-to-many relationship which is of a parent-child nature.
    The following exception is generated. Can anybody provide a suggestion to fix the problem?
    Exception [EclipseLink-45] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: Missing mapping for field [BASE_OBJECT.SAMPLE_ID].
    Descriptor: RelationalDescriptor(domain.example.entity.Sample --> [DatabaseTable(BASE_OBJECT), DatabaseTable(SAMPLE)])
    The schema is as follows:
    CREATE TABLE BASE_OBJECT(
    "BASE_OBJECT_ID" INTEGER PRIMARY KEY NOT NULL,
    "NAME" VARCHAR2(128) NOT NULL,
    "DESCRIPTION" CLOB NOT NULL,
    "BASE_OBJECT_KIND" NUMBER(5,0) NOT NULL );
    CREATE TABLE SAMPLE(
    "SAMPLE_ID" INTEGER PRIMARY KEY NOT NULL,
    "SAMPLE_TEXT" VARCHAR2(128) NOT NULL )
    CREATE TABLE SAMPLE_ITEM(
    "SAMPLE_ITEM_ID" INTEGER PRIMARY KEY NOT NULL,
    "SAMPLE_ID" INTEGER NOT NULL,
    "QUANTITY" INTEGER NOT NULL )
    The entities are related as follows:
    SAMPLE.SAMPLE_ID -> BASE_OBJECT.BASE_OBJECT_ID - The PKs that are used to join the sample to the base class
    SAMPLE_ITEM.SAMPLE_ITEM_ID -> BASE_OBJECT.BASE_OBJECT_ID - The PKs that are used to join the sample item to the base class
    SAMPLE_ITEM.SAMPLE_ID -> SAMPLE.SAMPLE_ID - The FK that is used to join the sample item to the sample class as a child of the parent.
    SAMPLE is one to many SAMPLE_ITEM
    The entity classes are as follows:
    @Entity
    @Table( name = "BASE_OBJECT" )
    @Inheritance( strategy = InheritanceType.JOINED )
    @DiscriminatorColumn( name = "BASE_KIND", discriminatorType = DiscriminatorType.INTEGER )
    @DiscriminatorValue( "1" )
    public class BaseObject
    extends SoaEntity
    @Id
    @GeneratedValue( strategy = GenerationType.SEQUENCE, generator = "BaseObjectIdSeqGen" )
    @SequenceGenerator( name = "BaseObjectIdSeqGen", sequenceName = "BASE_OBJECT_PK_SEQ", allocationSize = 1 )
    @Column( name = "BASE_ID" )
    private long baseObjectId = 0;
    @Entity
    @Table( name = "SAMPLE" )
    @PrimaryKeyJoinColumn( name = "SAMPLE_ID" )
    @AttributeOverride(name="baseObjectId", column=@Column(name="SAMPLE_ID"))
    @DiscriminatorValue( "2" )
    public class Sample
    extends BaseObject
    @OneToMany( cascade = CascadeType.ALL )
    @JoinColumn(name="SAMPLE_ID",referencedColumnName="SAMPLE_ID")
    private List<SampleItem> sampleItem = new LinkedList<SampleItem>();
    @Entity
    @Table( name = "SAMPLE_ITEM" )
    @PrimaryKeyJoinColumn( name = "SAMPLE_ITEM_ID" )
    @AttributeOverride(name="baseObjectId", column=@Column(name="SAMPLE_ITEM_ID"))
    @DiscriminatorValue( "3" )
    public class SampleItem
    extends BaseObject
    @Basic( optional = false )
    @Column( name = "SAMPLE_ID" )
    private long sampleId = 0;
    Edited by: Chris-R on Mar 2, 2010 4:45 PM

    Thanks for the thoroughness. There was a mistake in moving the code over for the forum. The field names are correct throughout the original source code.
    BASE_OBJECT_ID is used throughout.
    I suspect the problem lies in the one-to-many sampleItem(s) relationship that is based upon the subclassed item class. (The relationship is actually "sampleItems" in the real code and somehow got changed in the move over.)
    The problem may lie in the mapping of the attribute override in the child class to the referencing of the item class from the parent side of the relationship in the Sample class.
    I further suspect this may be specific to Eclipselink based upon other postings I've seen on the web that have similar problems...
    Any thoughts?
    Edited by: Chris-R on Mar 3, 2010 9:56 AM

  • Mapping one node to many nodes

    How do you map one node in a controller context to many other nodes in another controller context?
    Here's the situation I'd be using this.
    I have an Adaptive RFC model from which I created a Custom Controller. I then used the wizard to map to the model.
    The model corresponds to RFC functions and many of those functions accept the same parameters, LanID for instance. I simply want to have one "LanID" node in a controller that I would set. The change would then propagate to the other LanID context nodes in the Custom Controller mapped to the model.
    What's the best way to handle this?

    If I understand correctly.. B1, B2 and B3 are all in the SAME custom controller?  Even if they are, I don't see a problem of mapping them all to A1 which is in another controller. Let's say that A1 is the "original" node, and B1, B2 and B3 are the "mapped" nodes.
    If you require that B1, B2 and B3 are "original" nodes, and A1 is the "mapped" node, then this is scenario is impossible.
    If you can be more specific, I will try to answer your question better.
    Walter

  • One-to-many mapping and update the many part

    Hello !
    Here's my problem,
    I've got an object A having a vector of object B.
    The mapping in toplink is one-to-many with the back-references set in B.
    Insertion : no problem.
    Now i would like to change the Vector of B (inserting new B, updating existing B) in a function with the Vector vC (modified vector of B).
    What is the best way to do this ?
    I tried many thing but either I have toplink 6004 error, or doing it by removing all elements of the Vector (deleting all B in database), and then setting A with C (recreating all object in the modified Vector).
    Another way to explain my case:
    how to do this in UnitOfWork ?
    function modifyAVectorOfB(A, vectorOfC)
    AClone = uow.registerObject(A);
    Aclone.setVectorOfB(vectorOfC);
    uow.commit;
    (and in database all existing object in C are updated, new object in C are created, removed object in C are deleted)

    Have found a solution, read all object in the modified Vector, read the modified object in the Unit Of Work with readObject(B) (So i get the database or cache version) and then comparing it with the modified to change what is needed to be change.

  • Inheritance and One-To-Many Mapping Issue

    Are there any known issues with TopLink 4.6 mapping a one-to-many relationship where the classes in the list span more than 2 levels deep in the inheritance chain? We seem to notice that TopLink creates the class that is 2 levels deep before the owning class.

    Sorry for the delayed response to your post. I'm not sure I follow what you mean by "owning class". You have a 1-M mapping where the M has inheritance. Are you mapping to the root of the inhertance hierarchy, or to a leaf class? I.e., do you have a 1-M "Company - Employee" or a 1-M "Company - SalariedEmployee". In this example, what would you call the "owning class"?
    - Don

Maybe you are looking for