[ 
https://issues.apache.org/jira/browse/OPENJPA-2363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guillaume Chauvet resolved OPENJPA-2363.
----------------------------------------

    Resolution: Not A Problem

Just need to use JoinTable annotation with different table name for each 
OneToMany. See below :

@OneToMany(cascade = CascadeType.ALL)
@JoinTable(name = "ANSWERS")
private List<EntityB> answers = new LinkedList<EntityB>();
@OneToMany(cascade = CascadeType.ALL)
@JoinTable(name = "TARGETS")
private List<EntityB> targets = new LinkedList<EntityB>();
@OneToMany(cascade = CascadeType.ALL)
@JoinTable(name = "RESULTS")
private List<EntityB> results = new LinkedList<EntityB>();

> Multiple collections with same class type in a single entity : clear() delete 
> shared entities from collections.
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-2363
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2363
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.2.1
>            Reporter: Guillaume Chauvet
>         Attachments: OPENJPA-2363.zip
>
>
> Please find attached a draft including a unitary test that reproduce the 
> problem exposed on nabble [1].
> [1] 
> http://openjpa.208410.n2.nabble.com/Collections-with-same-class-type-in-a-entity-deleted-after-update-transaction-td7583212.html



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to