Hi,
Two classes below each with a member variable called "snap".
public class Class1 { private Long id; private Class2 class2; private Boolean snap; . .
public class Class2 { private Long id; private Boolean snap; private Integer blah; . .
Now if I run this code.... Criteria crit = hibernateSession.createCriteria(Class1.class); crit.createAlias("class2","class2Alias").add(Restrictions.eq("class2Alias.blah", 10));
...Tomcat generates this error: ERROR JDBCExceptionReporter:78 - Duplicate key or integrity constraint violation message from server: "Column 'snap' in where clause is ambiguous"
Does anyone know how to fix this without resorting to renaming the "snap" member variable in one of the classes?
Thanks.
|