Re: DB Setting null value one a not null column
Re: DB Setting null value one a not null column
- Subject: Re: DB Setting null value one a not null column
- From: Chuck Hill <email@hidden>
- Date: Wed, 16 Mar 2005 10:05:37 -0800
EOF behaves like a drunkard.
ROFL!
Yes, it really does not take kindly to you working with an EO before it
has been inserted into an editing context! While it is slow to anger,
it has the temper of a bad drunk.
Chuck
On Mar 16, 2005, at 10:02 AM, Ruenagel, Frank wrote:
Hi,
any EOs around which are initialized in the constructor and
not in awakeFromInsertion?
IIRC savings become unreliable if this is done, just in
the way you describe. Some updated attributes of the same
EO are saved, others are not. Unpredictable.
EOF behaves like a drunkard.
See
http://wodev.spearway.com/cgi-bin/WebObjects/WODev.woa/wa/Main?
wikiPage=EOFC
ommandments
HTH
Frank
-----Original Message-----
From: Florijan Stamenkovic [mailto:email@hidden]
Sent: Wednesday, March 16, 2005 6:05 PM
To: WebObjects Development
Subject: DB Setting null value one a not null column
Hi...
I get a really weird problem. I started getting an optimistic locking
failure exceptions in my app that look like this:
Application:
ContractsTry2
Error:
com.webobjects.eoaccess.EOGeneralAdaptorException:
lockRowComparingAttributes -- com.webobjects.jdbcadaptor.JDBCChannel:
lock operation fetched row with different values than snapshot
Reason:
lockRowComparingAttributes --
com.webobjects.jdbcadaptor.JDBCChannel:
lock operation fetched row with different values than snapshot
I checked the record in openbase and saw that one of the columns that
is set to not null is not having a value for some of my
records in that
table. Which is weird because i would expect openbase to complain if
such an insertion was attempted. Then I look at my still running app
(the same session as the the one that created and inserted
those rows)
and see in a listing that the value is there. So, I suppose
the object
in the editing context (default from session) has the value. The run
log does not contain the default validationFailedWithException()
message, as it does when I try to save with leaving the text
field for
the column missing on purpose. So, that also indicates that
the ec has
an object that DOES contain my input... So, how can it then get
inserted into the db as being null, without the db noticing???
And this behavior seems to be arbitrary... Some records get inserted
fine, and they go through the same creator component... Can't
see where
I screwed up...
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
village.net
This email sent to email@hidden
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development 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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden