You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Fay Wang (JIRA)" <ji...@apache.org> on 2010/11/22 18:04:13 UTC

[jira] Commented: (OPENJPA-1893) Missing join clause in query with collection-table with two join-columns

    [ https://issues.apache.org/jira/browse/OPENJPA-1893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12934509#action_12934509 ] 

Fay Wang commented on OPENJPA-1893:
-----------------------------------

Hi Patrice, 
   Could you post your Feature.java, your embedded id class, and embeddable class used in the element collection? Thanks!

> Missing join clause in query with collection-table with two join-columns
> ------------------------------------------------------------------------
>
>                 Key: OPENJPA-1893
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1893
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 2.0.1
>            Reporter: Patrice DUROUX
>
> Considering the following mapping:
> 	<entity class="Feature">
> 		<table name="features" />
> 		<attributes>
> 			<embedded-id name="id" />
> 			<element-collection name="attributes">
> 				<collection-table name="qualifiers" />
> 			</element-collection>
> 		</attributes>
> 	</entity>
> Without specifying any JoinColumn element in the CollectionTable element, I got the query:
> (...) INNER JOIN qualifiers t3 ON t0.index = t3.FEATURE_INDEX AND t0.oid = t3.FEATURE_OID (...)
> but changing the mapping by:
> 				<collection-table name="qualifiers">
> 					<join-column name="oid" />
> 					<join-column name="index" />
> 				</collection-table>
> I got:
> (...) INNER JOIN qualifiers t3 ON t0.index = t3.index (...)
> where is missing the first JoinColumn.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.