cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felipe Martín Santos <>
Subject Re: Possible bug in cayene 3.0.2 to set relationships???
Date Tue, 23 Oct 2012 08:36:40 GMT
Thank you very much Andrus, but your solution doesn't work. I still believe
that is a debug of cayenne.

To do that you've said me:

* To allow the Cayenne modeler check "to dep Pk" in the relationship
slave_table (ENCLOSURE) --> master_table (USE), I need before check the FK
(CD_USE)  in the slave_table, and so I can alredy select the check "to dep

But now i've another problem. I use Cayenne-Generated Primary Key, and when
I generate a new CayenneDataObject() type Enclosure:

> 1. Create and register a new Enclosure object in our Cayenne DataContext.
> 2. Retrieve from the database an  “Use” DataObject, an setUse in the
> Enclosure Object
> 3. Retrieve from  the database an “PieceOfGround” DataObject and
> setPieceOfGround in the Enclosure Objet.

I get this error:

org.apache.cayenne.CayenneRuntimeException: [v.3.0.2 Jun 11 2011 09:26:09]
Primary Key autogeneration only works for a single attribute.

... Before do this changes I expected that error because the pk
autogeneration only works wiht single values.....

I still think that is a cayenne problem or bug, because it doesn't allows
to have a fk to a unique field, must always be to a pk field :-(


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message