[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] Query to MappedSuperclass fails
|
My application is a store selling fishes, aquariums etc. I want to get a list
of top 10 items among all the items based on sales count. I use the
following class:
@MappedSuperclass
@NamedQueries({
@NamedQuery(name="getTopItems",query="SELECT x FROM FishStoreItem x ORDER
BY x.salescnt DESC, x.title DESC")
})
public abstract class FishStoreItem extends DomainSuperClass implements
Serializable {
......
}
Problem is in the following exception:
Exception [EclipseLink-8034] (Eclipse Persistence Services -
2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.JPQLException
Exception Description: Error compiling the query [getTopItems: SELECT x FROM
FishStoreItem x ORDER BY x.salescnt DESC, x.title DESC]. Unknown entity type
[FishStoreItem].
Same code works fine with Apache OpenJpa 2.0.0, but fails with EclipseLink
ver 2.0.0, 2.0.1, 1.0 (I have not tested it with other versions).
--
View this message in context: http://old.nabble.com/Query-to-MappedSuperclass-fails-tp29065708p29065708.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.