Hello;

The primary key is based on a person identifier, serial number, and the date the item was assigned to a person. I could generate a primary key that is a sequential number but hen that breaks referential integrity with other tables.

Don
On Jan 5, 2008, at 5:20 PM, Miguel Arroz wrote:

Hi!

A date as a primary key? Hummmmm.... never tried that, but my "not good idea" buzzer is buzzing! :)

I suppose you could override something in the framework to generate your own PKs (I know this is described somewhere, maybe in the Apple Enterprise Objects guide), but I don't think it's legal to set it manually. You shouldn't even have the diamond turned on on that attribute.

Is there any serious reason to use date as a PK? Why can't you use a normal PK? If you want to be sure that you don't have to equal dates, just set a unique constraint on the database.

 Yours

Miguel Arroz

On 2008/01/05, at 22:16, Don Lindsay wrote:

Hello;

One of the primary keys is a date field, how would the system set this date?

don
On Jan 5, 2008, at 5:11 PM, Miguel Arroz wrote:

Hi!

On 2008/01/05, at 22:05, Don Lindsay wrote:

I am using an oracle database. Anytime I attempt to insert a record in any table I get the following error:

[EMAIL PROTECTED] failed to provide new primary keys for entity 'WeaponAssignment'

I have set all of the primary key attributes before attempting to insert the object. So I am kind of confused why I keep receiving this message.

I don't understand what you mean by this. You have set the primary keys manually on the object? If you did, than that's the problem, that's the job of EOF, not yours. :)

Yours

Miguel Arroz

Miguel Arroz
http://www.terminalapp.net
http://www.ipragma.com





Miguel Arroz
http://www.terminalapp.net
http://www.ipragma.com




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
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