cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <>
Subject [jira] [Commented] (CAY-1896) Flattened attributes don't work with optimistic locking on
Date Thu, 25 Jun 2015 07:12:04 GMT


Andrus Adamchik commented on CAY-1896:

yeah, I guess the easiest way around for now would be to follow your suggestion: "modeler
should just disallow locking flattened attributes and the runtime can ignore locks on them".

Regarding the docs, I can only speak for myself, but I don't have any immediate plans to write
anything about flattened attributes specifically. But anyone is welcome to do that.

> Flattened attributes don't work with optimistic locking on
> ----------------------------------------------------------
>                 Key: CAY-1896
>                 URL:
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 3.2.M1
>            Reporter: John Huss
>         Attachments: 0001-Fix-flattened-attributes.patch,
> Flattened attributes can not be modified and saved with if you have optimistic locking
turned on for a to-one relationship in the same entity with the flattened attribute.  
> For example, say you have Artist and Painting and a flattened attribute "artistName"
on Painting and you set this to a new value.  And you also have optimistic locking on the
Painting.artist relationship.  It tries to generate SQL for the flattened object (Artist)
that includes the to-one relationship foreign key from the source object (Painting) and fails
because the column is not found:
> Column 'ARTIST_ID' is either not in any table in the FROM list...
> A minimal example is attached.

This message was sent by Atlassian JIRA

View raw message