Restrictions.isEmpty() / isNotEmpty() fail when collection is mapped to superclass.

Description

When attempting to use the Restrictions.isNotEmpty() method for a collection that is mapped to the superclass, a MappingException is thrown when looking up the CollectionPersister.

Looking at the code, the CollectionPersister is stored using the superclass name, in my case "test.subclass.collections.Person.races"

But when the SQL is being generated for the criterion, the role passed into the SessionFactoryImpl.getCollectionPersister(String role) method is "test.subclass.collections.Client.races" presumeably since the Criteria was created for the Client.class.

See attached TestCase.

Attachments

1

Activity

Steve EbersoleMay 3, 2005 at 10:13 PM

fixed in cvs

Preston SheldonMay 3, 2005 at 3:38 PM

adding TestCase

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created May 3, 2005 at 3:38 PM
Updated May 3, 2005 at 10:13 PM
Resolved May 3, 2005 at 10:13 PM