Join on ExtendedType invalidates ExtendedType when retrieving rows in parent
table using SelectQuery
----------------------------------------------------------------------------------------------------
Key: CAY-1092
URL: https://issues.apache.org/cayenne/browse/CAY-1092
Project: Cayenne
Issue Type: Bug
Affects Versions: 3.0
Environment: PostgreSQL; PostgreSQL JDBC 8.2; using uniqueidentifier
as ExtendedType.
Reporter: Chris Gamache
Assignee: Andrus Adamchik
Steps to reproduce the problem:
Create tables, parent and child, with a foreign key link on an ExtendedType
Create cayenne.xml, and node configurations. Reverse engineer tables.
Inside your class, create a DataContext, and select a single row from the
parent table.
Attempt to access the field used as the foreign key.
ClassCastException is thrown because the wrong return type is used
(org.postgresql.util.PGobject instead of java.util.UUID)
If the cayenne configuration is modified removing the parent-child relation and
the project cleaned and recompiled, no ClassCastException is thrown when the
parentUuid field is accessed.
I have an eclipse project that I can provide which demonstrates the problem.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.