Re: Abstract Entities [Was: Modelling improvements: inheritance + interfacing (Draft)]

From: Aristedes Maniatis (ar..aniatis.org)
Date: Wed May 30 2007 - 20:32:22 EDT

  • Next message: Mike Kienenberger: "Re: Abstract Entities [Was: Modelling improvements: inheritance + interfacing (Draft)]"

    On 31/05/2007, at 2:40 AM, Kevin Menard wrote:

    > I'm clearly showing my ignorance on the matter here, but what does it
    > mean for an object to know that it's abstract? Isn't that a
    > property of
    > the class? What happens when you subclass the ObjEntity?

    Cayenne will need to know this information. For instance, you might
    have inheritance with an abstract superclass Person. Then performing
    a query on that class, Cayenne will need to automatically return
    objects of Student and Tutor subclasses and not the Person
    superclass. Effectively the flag "setResolvingInherited" will be
    switched on automatically.

    If nothing else, this information needs to be stored in the Datamap
    and the logical place is in the ObjEntity itself.

    When we get to vertical inheritance there will be at least one other
    property added to the ObjEntity: the name of the relationship used to
    find the superclass.

    Ari Maniatis

    -------------------------->
    Aristedes Maniatis
    phone +61 2 9660 9700
    PGP fingerprint 08 57 20 4B 80 69 59 E2 A9 BF 2D 48 C2 20 0C C8





    This archive was generated by hypermail 2.0.0 : Wed May 30 2007 - 20:33:02 EDT