java - Map a list of strings with JPA/Hibernate annotations -
I have to do something like this:
@Entity public class bar {@Id @ Generated Long id; & Lt; String & gt; Foos} And continue fuse in a table like this:
foo_bars (bar_id int, foo varchar (64)); Update: I know how to map other entities, but in many cases this is redundant. It seems that what I am suggesting is not possible without ending with everything else or in some Blob columns without any other entity. There is a (hibernate-specific) annotation for this in the "post-text" itemprop = "text">
It is in "collection of values" or "elements", although the Jpa does not support this (however).
In short, comment your collection like this:
@collectionOfElements @JoinTable (table = @ table (name = "..."), JoinColumns = @JoinColumn (name = "...") // reference parent) @column (name = "... value ...", tapable = false)
And with the sanctions, the necessary table will be created.
Comments
Post a Comment