Re: abstract entities, inheritance, etc.

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Apr 24 2009 - 02:23:47 EDT

  • Next message: Robert Zeigler: "Re: abstract entities, inheritance, etc."

    On Apr 24, 2009, at 5:35 AM, Robert Zeigler wrote:

    > No, it's a bit more complicated. The template is one portion of the
    > fix, but even if the entity is marked abstract (in both the mapping
    > and the java class), cayenne will try to instantiate it in the
    > aforementioned query on superclass case. So a complete solution
    > will require that case to resolve and instantiate the subclass
    > types, rather than attempting to instantiate the superclass type.
    >
    > Robert

    Hi Robert,

    The whole logic for instantiating an object of a given class is based
    on the combination of entity qualifiers in the hierarchy (including on
    the base class). So unless this is a bug specific to EJBQLQuery
    (could you try the same thing with SelectQuery?), maybe the condition
    on a given result set row yielded a base class somehow?

    Could you post the stack trace and entity qualifiers?

    Thanks,
    Andrus



    This archive was generated by hypermail 2.0.0 : Fri Apr 24 2009 - 02:24:20 EDT