OJB won't manipulate your instance attribute unless you tell it to do so.
If you declare your timestamp attribute as locking="true" in repository.xml, OJB will fill the attribute with the current timestamp.
But it won't do so otherwise. So please check the FieldDescriptor of your persistent class.
cheers,
Thomas
Yuriy Zubarev wrote:
Hi, Database is mySQL (3.23.53 on NT) and it certainly doesn't set current date by itself. If I insert new record via JDBC without mentioning my date-related field, the value for this field is null, so I think OJB (PB) inserts current date when the field value in the persisted object equals null.Yuriy ZubarevWhich database ? Certainly SQL server will automatically (and always) set the valueTIMESTAMPfields with the date and time of insert/update. Cheers, Charles.-----Original Message----- From: Yuriy Zubarev [mailto:[EMAIL PROTECTED]] Sent: 22 November 2002 10:03 To: OJB Users List Subject: Null value for DATE/TIMESTAMP fields Hello everyone, I have a property in my object of type java.util.Date which is mapped to DATE type (or TIMESTAMP) into repository.xml. Corresponding database field is of type Timestamp, it's nullable and doesn't have default value. The problem is that when I set this property to null and persist the object I end up having current date (and time) in database and that's not expected behaviour. Dumb implementation of FiledConversion that returns null without any logic didn't help. Any help would be greatly appreciated. Thanks, Yuriy Zubarev __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail:<mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>__________________________________________________ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
