Details
-
Task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.1M2
-
None
Description
Will change logic in the ReferenceableHandler. Per my experience with Referenceable so far it doesn't make sense to inject a UUID property into the object, as it can be calculated on demand with fairly trivial overhead. So ReferenceableHandler will no longer be a listener that injects UUID, but rather its 'getReferenceable' method will return UUID calculated from ObjectId on the fly.
This also fixes a bug - an exception when extracting UUID from a HOLLOW object, since we can read ObjectId of a HOLLOW object without inflating it form DB.
Finally @Referenceable annotation is no longer needed and can be removed from Cayenne. After all every single object in Cayenne has ObjectId and hence we can produce a UUID for it. The only current purpose of @Referenceable is therefore to provide UUID as a property (which is not that useful). End users who would still like to inject UUID in their objects, can declare their own annotation and their own listener.