| Author |
JodaTime Map
|
Alesandro Lang
Greenhorn
Joined: May 20, 2011
Posts: 5
|
|
Hello,
I want to save a java.util.Map to the Database with JPA. The Key Object is from org.joda.time.LocalDate the Value Object is an Integer. I tried a lot of stuff with the help of JodaTime-Hibernate.
e.G.
It would be great if there is a solution which is not hibernate specific.
|
 |
Alesandro Lang
Greenhorn
Joined: May 20, 2011
Posts: 5
|
|
@CollectionOfElements is deprecated now Iam using @ElementCollection
-> org.hibernate.MappingException: collection index mapping has wrong number of columns
|
 |
Alesandro Lang
Greenhorn
Joined: May 20, 2011
Posts: 5
|
|
My workaround at the end of the day was to save java.util.Date and convert it to LocalDate .
I uses the @PrePersist and @PostLoad Annotations for this.
|
 |
 |
|
|
subject: JodaTime Map
|
|
|