cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Gentry (JIRA)" <>
Subject [jira] [Commented] (CAY-504) Add "none" and "table-based" PK generation Strategies
Date Thu, 23 May 2013 16:00:21 GMT


Michael Gentry commented on CAY-504:

To comment upon a very old issue/thread ...

This hit one of the developers here today.  He had a one-to-one relationship A<->B where
the master record A's PK was supposed to be pushed to the dependent child B (and the appropriate
"To Dep PK" checkbox *was* set in A's relationship tab).  However, B's PK Generation Strategy
was set to Database-Generated instead of Default, therefore Cayenne didn't try to push A's
PK into B.  Instead, it left the PK out completely (expecting MySQL to auto-generate the PK,
I suppose) and the INSERT blew up because the table didn't have auto-increment for the PK
turned on.  Even if the table had been created to auto-generate the PK, the PKs in A and B
wouldn't have matched, so this would still be a failure.

A PK Generation strategy of None would make more sense here to me than Default, which implies
to me the AUTO_PK_SUPPORT table should be used.

This was in 3.0.2, FWIW.

> Add "none" and "table-based" PK generation Strategies
> -----------------------------------------------------
>                 Key: CAY-504
>                 URL:
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Modeler
>    Affects Versions: 1.2 branch
>            Reporter: Mike Kienenberger
>             Fix For: Undefined future
> Modeler "PK generation Strategy" should support "none" (no automatic pk generation) and
"auto pk table" (default table-based database-independent AUTO_PK_TABLE generation).

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

View raw message