OpenBase and Cannot update primary-key 'fooID' from '1364' to '1364' on object of entity Foo
Hi All, I searched Google first for similar problems and I found some but I could not figure out what the resolution was. These were old messages (2004 or 2006 I think). But anyways, I think I have a clue. EOF thinks that the primary key value has changed but it hasn't. So my guess is that the value in the snapshot of the EO and the value in the EO are not matching... not completely sure why. I have the primary key fooID turned on as a class property in my Foo entity. I'm thinking that may have something to do. Maybe if I turn it off will make it go away. fooID in OpenBase is a foo_id of type long. In my eomodel I used the id prototype from ERPrototype. Which it says the external type is an int. But like I said, in OpenBase it is really a long. Could this long in OpenBase vs. int in my eomodel cause a problem like this? Has anybody ran into this problem with OpenBase? Thanks, Ricardo ___ 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 arch...@mail-archive.com
Re: OpenBase and Cannot update primary-key 'fooID' from '1364' to '1364' on object of entity Foo
On Mar 24, 2009, at 5:19 PM, Ricardo J. Parada wrote: Hi All, I searched Google first for similar problems and I found some but I could not figure out what the resolution was. These were old messages (2004 or 2006 I think). But anyways, I think I have a clue. EOF thinks that the primary key value has changed but it hasn't. So my guess is that the value in the snapshot of the EO and the value in the EO are not matching... not completely sure why. I have the primary key fooID turned on as a class property in my Foo entity. I'm thinking that may have something to do. Maybe if I turn it off will make it go away. Exposing the PK, while generally considered naughty, will not cause this. Exposing a FK _will_. fooID in OpenBase is a foo_id of type long. In my eomodel I used the id prototype from ERPrototype. Which it says the external type is an int. But like I said, in OpenBase it is really a long. Could this long in OpenBase vs. int in my eomodel cause a problem like this? Has anybody ran into this problem with OpenBase? I think Mike is on this. Usually it is a Long vs Integer problem where the value is the same, but the class is not. Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ 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 arch...@mail-archive.com
Re: OpenBase and Cannot update primary-key 'fooID' from '1364' to '1364' on object of entity Foo
On Mar 24, 2009, at 8:28 PM, Chuck Hill wrote: Hi All, I searched Google first for similar problems and I found some but I could not figure out what the resolution was. These were old messages (2004 or 2006 I think). But anyways, I think I have a clue. EOF thinks that the primary key value has changed but it hasn't. So my guess is that the value in the snapshot of the EO and the value in the EO are not matching... not completely sure why. I have the primary key fooID turned on as a class property in my Foo entity. I'm thinking that may have something to do. Maybe if I turn it off will make it go away. Exposing the PK, while generally considered naughty, will not cause this. Exposing a FK _will_. Thanks Chuck.. I just went through my eomodel and turned off the class property icon on some foreign keys and primary keys that had it on. I DONT really need them on. fooID in OpenBase is a foo_id of type long. In my eomodel I used the id prototype from ERPrototype. Which it says the external type is an int. But like I said, in OpenBase it is really a long. Could this long in OpenBase vs. int in my eomodel cause a problem like this? Has anybody ran into this problem with OpenBase? I think Mike is on this. Usually it is a Long vs Integer problem where the value is the same, but the class is not. Hmm... maybe I can try changing the type in OpenBase for foreign keys and primary keys to use int to see if the problem goes away. Anyways, thanks for the info. ___ 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 arch...@mail-archive.com