Jaxox
Jaxox

Reputation: 968

hibernate 4 and joda-LocalDate and persist it as SQL Date

This link is almost what i am looking for but, it persists the LocalDate on my oracle db as Raw(255), so my question is how I can persist joda LocalDate to sql date?

Upvotes: 1

Views: 600

Answers (1)

Jaxox
Jaxox

Reputation: 968

Ok, finally.

For my case, if I use org.jadira.usertype. somehow it persists the localdate as raw(255) on oracle.

    <dependency>
        <groupId>org.jadira.usertype</groupId>
        <artifactId>usertype.core</artifactId>
        <version>3.1.0.CR10</version>
    </dependency>

so if i change it to joda-time-hibernate, it seems working fine now, it persists as sql date.

    <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time-hibernate</artifactId>
        <version>1.3</version>
    </dependency>

Upvotes: 1

Related Questions