I’ve a legacy code that create 2 SessionFactory for the same database (for some unkown reason)
and it works , thatis 2 session factories are created in version 3.x
all entites are in hbm format for now
when I use the same code in version 5.4.x I get the following excption:
org.hibernate.DuplicateMappingException: Duplicate query mapping NAMES_QUERY_NAME
can some explain me why I get this error since I have only ine named query with that name or what have changed in version 5.X? Moreover when I use JPA annotation instead of hbm I don’t get this error.
And is there any reason to use 2 session factories for the same DB (one DB in system)
Thank u in advance