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: "Ruenagel, Frank" <email@hidden>
- Date: Wed, 16 Mar 2005 19:02:21 +0100
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:
This email sent to email@hidden