Pink Sandbox

Stalk Me!

Actually, it's friends only. But hey, why don't you ask? I might be tolerant of new stalkers. ;)\

>> About Me

Recent Comments

Recent Posts

Archives

Categories

Popular Tags

Links

Adsense to Goodness

March 25, 2009 @ 10:51 am

Changing Hibernate Mapping from XML to Annotations

It was because of my job interview last Friday that I’ve decided to start doing away with mapping my hibernate metadata on xml and go for Annotations instead. The interviewer suggested it and of course I’m easily convinced once I heard that “it make things easier.”

Read rest of story…

Filed under Geekology · No Comments »

February 2, 2009 @ 5:36 am

Value ‘0000-00-00′ can not be represented as java.sql.Timestamp

I’ve been googling for an easy workaround to a org.hibernate.exception.GenericJDBCException: Value ‘0000-00-00′ can not be represented as java.sql.Timestamp. Changing the zero-dates to null is not actually an option because it might break the (poorly developed) application already using the database. This application I am working would just want to query a few reports from it. So…

Finally, I was able to stumble onto a straightforward solution to the Value ‘0000-00-00′ can not be represented as java.sql.Timestamp exception:

  • It is a MySQL specific error.
  • You just need to add ?zeroDateTimeBehavior=convertToNull to your connection string (jdbc:mysql://myhost/mydatabase?zeroDateTimeBehavior=convertToNull)

So thank you! :D

Filed under Geekology · No Comments »

<tumblr>

<!-- just so there's movement in this idle blog.-->

</tumblr>