Re: Primary Key Type
Paul Lynch <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
On 3 Nov 2006, at 05:32, Jeff Edwards wrote: > In my last Web Objects app, we used integers as primary keys. > > Using EO Modellor and WO, I need to us varchar(10) primary key, in an > existing database that will now have a web interface. > > Is this possible? Yes. You will need some way of providing PKs for newly added EOs, as automatic generation from EOF won't be possible any more. If the PK values are required by the database design to be provided by the users, then they can be made into class properties, in which case they should be filled out before saving. If you want to generate values automatically, then you will want to implement databaseContextNewPrimaryKey() in an EODatabaseContext delegate. Paul