java - Hibernate is creating one more table in addition to the required table -
@genericgenerator(name="hilo-gen",strategy="hilo") @collectionid(columns={@column(name="address_id")}, generator="hilo-gen", type=@type(type= "int") ) @jointable(name="friends_addresses",joincolumns={@joincolumn(name="user_id")}) @elementcollection(fetch=fetchtype.eager) public collection <address> getfriendsaddresses() { return friendsaddresses; } on saving list of address (@embeddable), see hibernate created 1 more table (hibernate_unique_key) in mysql. there strategy avoid this?
hibernates uses additional table generate unique ids if don't enable auto incrementing ids.
Comments
Post a Comment