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.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupdev @
postedAug 7, '08 at 2:27p
activeAug 7, '08 at 2:27p

1 user in discussion

Anonymous: 1 post



site design / logo © 2022 Grokbase