cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <>
Subject [jira] [Commented] (CAY-1728) Custom types used for PK are causing grief in relationships
Date Sun, 22 Jul 2012 10:22:33 GMT


Andrus Adamchik commented on CAY-1728:

Related discussion on the dev list: If we make
this change, this Jira will just go away by itself.
> Custom types used for PK are causing grief in relationships
> -----------------------------------------------------------
>                 Key: CAY-1728
>                 URL:
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 3.1B1, 3.2M1
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>         Attachments: 0001-testing-custom-types-as-PK.patch
> 1. Map an entity with meaningful PK, type of that PK being a non-standard type for a
given type of column (e.g. attached test case demonstrating the problem maps a VARCHAR column
to java.util.UUID).
> 2. Map another entity with an FK to the first entity, and create a to-one relaionship.
> 3. Fetch entity 2 and try to read the relationship to entity 1. The result is a FaultFailureException
similar to this one:
> org.apache.cayenne.FaultFailureException: [v.3.2M1-SNAPSHOT ${} ${}]
Error resolving fault for ObjectId: <ObjectId:UuidPkEntity, ID=8251ae98-de42-404c-9cd0-9c1b29410604>
and state (hollow). Possible cause - matching row is missing from the database.
> 	at org.apache.cayenne.BaseContext.prepareForAccess(
> 	at org.apache.cayenne.CayenneDataObject.readProperty(
> 	at
> 	at org.apache.cayenne.access.UUIDTest.testUUIDMeaningfulPkSelectViaRelationship(
> The reason is that expected ObjectId of the target entity contains a value of type String
instead of UUID, so expected and fetched ObjectId do not match, and Cayenne thinks there's
no object for relationship.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message