• Post Reply Bookmark Topic Watch Topic
  • New Topic

(JPA) How to normalize my database

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.
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!