I would say no. The best practice is that the Primary Key has no meaning outside of the database, and by definition the "id" field given by default will be unique for each row in the database. This means it should not be visible as a class property. If you look at the Wonder generated PK you'll see that the little diamond is not appearing beside it in Entity Modeler. You should keep your "document" separate if it has meaning in your Person object. There is no need to add "document" to the PK since "id" is unique by itself.

If you find you do need to access your PK later, you can do so following the directions at this page: http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF- Primary+Keys

David

On 20-Mar-08, at 2:35 PM, Gustavo Pizano wrote:

Well I started to create the EOModel and the questions began to arise.

I c that Wonder gives me an id as Pk, but in the model I have te follwoing, something similar to what David showed in the screencast

(Using the folloing names just to follow the project statement)
Table : Person
Atributes: document
                  phone
                  address

so if there is and id as PK, shouldnt I put the document as PK as well? to avoid data repetitions?,

Gus


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/programmingosx %40mac.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to