cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank" <faro...@hotmail.com>
Subject Re: New user PK id question
Date Thu, 01 Feb 2007 14:38:42 GMT
Yes,

I get this error:
Validation failure for stemc.cayenne.Employees.id: "id"  is required.

Frank

----- Original Message ----- 
From: "Peter Schröder" <Peter.Schroeder@freenet-ag.de>
To: <user@cayenne.apache.org>
Sent: Thursday, February 01, 2007 9:31 AM
Subject: AW: New user PK id question


did you set the pk-generation properly (database-generated) in the modeler?

-----Urspr√ľngliche Nachricht-----
Von: Frank [mailto:farocco@hotmail.com]
Gesendet: Donnerstag, 1. Februar 2007 15:23
An: user@cayenne.apache.org
Betreff: New user PK id question

Hello,

I have a mysql table with a PK of id that is auto incremented.
The getter is not generated for this pk.
I need to use the pk id in a table as a link to allow the user to edit.
If I add the pk id to the objEntity, whenever I try to add a record, cayenne 
complains that the pk id field cannot be blank
I assign a value of 1 to the pk id and I can save the record.
When I look at the record just added, the pk id show the correct value 
assigned by mysql(not 1)

What am I doing wrong?
I need theh id to add to the link.

Thanks
Frank


Mime
View raw message