Re: mysterious EOF problem: not inserting all fields
Re: mysterious EOF problem: not inserting all fields
- Subject: Re: mysterious EOF problem: not inserting all fields
- From: Dov Rosenberg <email@hidden>
- Date: Tue, 06 Apr 2004 15:07:23 -0400
You didn't mention your database that your using or the data types of the
columns being affected. You might want to consider the following:
* Make sure that the model plist files are correct and have the correct user
permissions
* make sure that your generated java classes contain the methods that you
expect and they match the expected output based on the EOModel.
* Check the meta data info at the top of your index.eomodeld file by viewing
it in a text editor - make sure they match your database
* try browsing the database using either DBEdit or EOModeler.
* If you are using Prototypes, make sure the definitions are correct.
HTH
On 4/6/04 2:37 PM, "Jonathan Rochkind" <email@hidden> wrote:
> I have an EO class, with a bunch of attributes. One of these
> attributes is marked non-nullible in the model, and also in the
> database.
>
> When a create and insert a new one in code, of course I set this
> attribute. Before calling saveChanges, I check in my debugger to make
> sure that attribute has a value---it does. I call saveChanges. EOF
> validation does _not_ raise an exception, complaining that this
> attribute is not allowed to be null. Which I do not expect it to, of
> course, because that attribute is NOT null.
>
> However, when EOF actually sends an SQL insert to the database----the
> insert statement does not include this attribute! And then of course
> my database complains about that attribute not being allowed to be
> null, and rejects the insert. Huh? Why is EOF not listing all
> attributes in the insert? Yes, the attribute in question is marked as
> a class property.
>
> To make matters more confusing---this problem seems to have just
> randomly started. I can't figure out what I have changed to make this
> problem start, when the problem did not previously exist, for the
> same code I am testing.
>
> Anyone have any ideas at all? I'm at my wits end here. Somehow this
> problem got deployed (I swear, it didn't show up in testing, that's
> the weird thing---although now I can reproduce it on my local machine
> as well as the deployment machine), so I've got to get it fixed asap.
>
> --Jonathan
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
>
--
Dov Rosenberg
Conviveon Corporation
http://www.conviveon.com
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.