You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Sopot Çela <th...@yahoo.com> on 2010/06/02 15:23:48 UTC
Primary Keys Issue
Hello all,
I have an issue. I have CayenneModeller import a database structure from a MySQL database. When I generate the classes I want that *all* the classes have also the primary key field. Surely I can do it manually for every table, that is, add an attribute and relate it to the primary key but I want this to be done automatically.
Thanks in advance for any help.
Sopot
Re: Primary Keys Issue
Posted by Sopot Çela <th...@yahoo.com>.
Thank you very much Andrus for your quick and accurate response.
----- Original Message ----
From: Andrus Adamchik <an...@objectstyle.org>
To: user@cayenne.apache.org
Sent: Wed, June 2, 2010 3:31:17 PM
Subject: Re: Primary Keys Issue
Hi there,
You will need to check "Meaningful PK" check box when doing reverse-engineering.
Andrus
On Jun 2, 2010, at 9:23 AM, Sopot Çela wrote:
> Hello all,
>
> I have an issue. I have CayenneModeller import a database structure from a MySQL database. When I generate the classes I want that *all* the classes have also the primary key field. Surely I can do it manually for every table, that is, add an attribute and relate it to the primary key but I want this to be done automatically.
>
> Thanks in advance for any help.
> Sopot
>
>
Re: Primary Keys Issue
Posted by Andrus Adamchik <an...@objectstyle.org>.
Hi there,
You will need to check "Meaningful PK" check box when doing reverse-
engineering.
Andrus
On Jun 2, 2010, at 9:23 AM, Sopot Çela wrote:
> Hello all,
>
> I have an issue. I have CayenneModeller import a database structure
> from a MySQL database. When I generate the classes I want that *all*
> the classes have also the primary key field. Surely I can do it
> manually for every table, that is, add an attribute and relate it to
> the primary key but I want this to be done automatically.
>
> Thanks in advance for any help.
> Sopot
>
>