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

Richard Zowalla resolved OPENJPA-1607.
--------------------------------------
    Resolution: Fixed

Already fixed on master: 8c1e1a7ea (OPENJPA-1253) is on master; 
RelationToManyInverseKeyFieldStrategy.map 
(openjpa-jdbc/.../strats/RelationToManyInverseKeyFieldStrategy.java:124-132) 
skips assertNoSchemaComponents for uni-directional 1-M when non-default mapping 
is allowed (JPA 2.0+), so the error now only appears for spec-1.0 units. 
Closing; please reopen if this still happens with OpenJPA 4.x.

> Using unidirectional one-to-many target foreign key throws exception
> --------------------------------------------------------------------
>
>                 Key: OPENJPA-1607
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1607
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.0.0-beta3
>            Reporter: Oliver Ringel
>            Priority: Major
>         Attachments: openjpa-1607.tar
>
>
> Using this simple unidirectional relationship
> @OneToMany
> @JoinColumn(name = "DEPARTMENT_ID")
> private Set<Employee> employees;
> causes to the following exception
> <openjpa-2.0.0-beta3-r422266:926797 fatal user error> 
> org.apache.openjpa.persistence.ArgumentException: You have supplied columns 
> for "com.example.Department.employees", but this mapping cannot have columns 
> in this context.
> Unidirectional one-to-many target foreign key relationship should be 
> supported in JPA 2.0.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to