openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrice DUROUX (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-1893) Missing join clause in query with collection-table with two join-columns
Date Mon, 22 Nov 2010 16:36:13 GMT
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.


Mime
View raw message