Re: Automatic Long (8 byte) Primary Key?
Re: Automatic Long (8 byte) Primary Key?
- Subject: Re: Automatic Long (8 byte) Primary Key?
- From: Alexander Spohr <email@hidden>
- Date: Sun, 21 Oct 2012 12:45:57 +0200
Am 19.10.2012 um 11:44 schrieb Alexander Spohr <email@hidden>:
> I need an entity to have a long (8 byte) primary key.
> How do I tell EOF to generate it from a sequence as it does with 4 byte keys?
Now this gets strange.
I changed the pk to prototype id (int4) because I could not get EOF to call my primaryKeyDictionary(boolean). But EOF just ignores all inserted objects of this class. It just does not generate a pk - but tries to save them to the database anyway.
What I see:
1. SELECT NEXTVAL('Player_seq')
2. SELECT NEXTVAL('Avatar_seq')
3. INSERT INTO Player
4. INSERT INTO Avatar
5. INSERT INTO Gear
6. exception
The question here is why EOF isn’t getting the pk for Gear - but tries to save them. I don’t see any difference in the eomodel’s plists. It has a single pk that is not an attribute and not null, like all other tables do.
Looks like it thinks that I fill the pk. But the attribute is non-null, why does EOF save the whole record then? The pk attribute seems to be invisible to EOF.
Any ideas?
atze
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden