This week's book giveaway is in the Features new in Java 9 forum.
We're giving away four copies of Java 9 Revealed and have Kishori Sharan on-line!
See this thread for details.
Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

(JPA) How to normalize my database  RSS feed

 
Edward Nunez
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a data transfer object User. Users have a couple of member variables, one is a ArrayList of enumerated types and another a HashMap<String, Integer>, whose data I would like to actually see in my database. At the moment, these variables are annotated with @ElementCollection which places them in their User rows as serialized object strings. That works but it isn't very normalized. I think there's a way to get the @OneToMany etc. annotations working with these collections but I'm sure how.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!