Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] MappedSuperclass NamedQueries

Hi everyone. Thanks ahead of time for any help.

I have an application that has multiple levels of inheritance, and I've run
into an issue I can't seem to fix. I've got an abstract class PayableItem
that is an Entity. It has the inheritance type of JOINED and a discriminator
column and value. I then have an abstract class AbstractInvoice that is a
MappedSuperclass. Then the idea is to have the possibility that there could
be one or more classes that inherit the AbstractInvoice class that are
Entities.

Now, where the problem comes in, because the AbstractInvoice has important
fields that I wish to have queries on, I have the NamedQueries on the
AbstractInvoice class. I get an error about the AbstractInvoice class being
an Unknown abstract schema type even though I've put it in the
persistence.xml. I'm sure it is because the named queries in the FROM area
reference AbstractInvoice instead of the class inheriting AbstractInvoice,
and since AbstractInvoice is not an Entity, I can't seem to use it in the
NamedQuery. The thing is, NamedQueries are allowed in MappedSuperclass
classes, but that seems to be useless.

Can anyone either clear up what I might be doing wrong, or if the above
isn't really possible, or maybe suggest a better way of organizing things so
that it will actually work?

Thank you,
Stephanie
-- 
View this message in context: http://www.nabble.com/MappedSuperclass-NamedQueries-tp22215521p22215521.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top