java - Hibernate 5 id uniqueness -


in hibernate 5 problem if use same id value in different tables?

i have 2 entities annotation:

@id @column(name = "id") public string getid() {      return id; } 

if call session.get(myclass.class, "theid") can right entity?

yes, can create such mappings because

  • two classes in java may have field same name
  • two tables in database may have column same name

there nothing else it.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -