I have 2 POJOs: Menugroup, Catgroup. Menugroup has one-to-many replationship with Catgroup. Evenything works fine when I declared Catgroups as java.util.HashSet. I started getting the problem when I changed the collections type to java.util.List.
Getting the below exception:
Menugroup.java POJO is below:-
Catgroup.java POJO is below;-
Menugroup.hbm.xml is below:-
Catgroup.hbm.xml is below:-
This is my jave code snippet tries pull the data from DB:
Hibernate generates the below SQLs in the console:
I don't know, from where hibernate adds this column 'catgroups0_.idx' in the SQL since I never defined this column anywhere. The same thing works fine for Set Collections, but it is not working for java.util.List, this is really strange, I don't know whether I am really missing some thing or this a BUG in hibernate ?. Could any one please help me.