Re: exposing the primary key?

2014-03-01 Thread Musall Maik
Am 28.02.2014 um 22:25 schrieb Theodore Petrosky tedp...@yahoo.com: I need to create an Entity that will have a user visible id number. I thought I would just use the primaryKey but I recall reading so many times don't use the primaryKey for this. This is a very simple Entity. It has a

exposing the primary key?

2014-02-28 Thread Theodore Petrosky
I need to create an Entity that will have a user visible id number. I thought I would just use the primaryKey but I recall reading so many times don't use the primaryKey for this. This is a very simple Entity. It has a description, a Client, and a boolean (isActive). When the user views a list

Re: exposing the primary key?

2014-02-28 Thread Chuck Hill
Does it mean anything to the user? I assume it does, otherwise, why would you show it? So what is going to happen when they see this: id numberdescription client 3456 Blue Dress Amex 3457 Blue Socks Chuck 3459 Blue Tie Ted 3460

Re: exposing the primary key?

2014-02-28 Thread Jesse Tayler
generate a unique ID, if you don’t mind using HEX…. On Feb 28, 2014, at 4:32 PM, Chuck Hill ch...@global-village.net wrote: Does it mean anything to the user? I assume it does, otherwise, why would you show it? So what is going to happen when they see this: id numberdescription

Re: exposing the primary key?

2014-02-28 Thread Aaron Rosenzweig
Hi Ted, If you must expose the primary key… make a duplicate attribute with a Read format and make it read only. Look at page 41 of this document: https://developer.apple.com/legacy/library/documentation/WebObjects/UsingEOModeler/UsingEOModeler.pdf Exposing the PK as a class property could

Re: exposing the primary key?

2014-02-28 Thread Chuck Hill
Actually, exposing the PK is fine with EOF. Exposing an FK is what causes real problems. On 2014-02-28, 1:47 PM, Aaron Rosenzweig wrote: Hi Ted, If you must expose the primary key… make a duplicate attribute with a Read format and make it read only. Look at page 41 of this document:

Re: exposing the primary key?

2014-02-28 Thread Theodore Petrosky
in this case it means nothing to skip a number. after some time they will see: id numberdescription client 4000 Blue Dress Amex 3857 Blue Socks Chuck 3459 Blue Tie Ted 3460 Blue Blouse Visa because the other numbers

Re: exposing the primary key?

2014-02-28 Thread Ramsey Gurley
EOF can handle it. Sure. But users can’t handle the Primary Key! [Jack Nicholson face] Expose it, and they’ll want to change it. Guaranteed. Besides, just displaying it is no reason to expose it. You can display it just by using ERXGenericRecord’s primaryKey() method. You can fetch by PK too,

Re: exposing the primary key?

2014-02-28 Thread Klaus I. Berkling
On Feb 28, 2014, at 2:02 PM, Theodore Petrosky tedp...@yahoo.com wrote: id numberdescription client 4000 Blue Dress Amex 3857 Blue Socks Chuck 3459 Blue Tie Ted 3460 Blue Blouse Visa because the other numbers

Re: exposing the primary key?

2014-02-28 Thread Chuck Hill
On 2014-02-28, 2:18 PM, Ramsey Gurley wrote: EOF can handle it. Sure. But users can’t handle the Primary Key! [Jack Nicholson face] Expose it, and they’ll want to change it. Guaranteed. That depends on how you use it. Besides, just displaying it is no reason to expose it. You can display it