Hi,
There seems to be a problem with using the
entity-name attribute and search-by-example. Essentially I have the following mapping file (minus stuff that I think is irrelevant!):
Code:
<class name="MyClass" entity-name="MyClassSummary" ...>
...
</class>
<class name="MyClass" ...>
...
</class>
I then try a find by example, e.g.:
Code:
MyClass obj = new MyClass();
// Set some properties of obj
session.createCriteria(MyClass.class).add(Example.create(obj)).list();
And I get twice as many records back as I am expecting - basically one set for each <class> declaration (I tried it first without the first <class> element above and got the number of records I was expecting).