java - Map database table to a Hashtable -
i have simple table in oracle db columns : "key", "value". map table in java code there anyway of doing straightly in jpa? or should manually ?
thanks, ray.
if key , value basic or embedded types want use
@elementcollection @collectiontable(name = "table") @mapkeycolumn(name = "key") @column(name = "value") protected map<a,b> map;
if entites want have @ docs following, can choose appropriate.
@onetomany @manytomany @mapkey @mapkeyclass
Comments
Post a Comment