Question about flatten relationship

From: xuzhou (xuzho..oftHome.net)
Date: Fri Nov 22 2002 - 01:41:11 EST

  • Next message: Craig Miskell: "Re: Question about flatten relationship"

    Hi all,

    The following italic text is excerpted from Release Notes of Cayenne 1.0b1. I think this feature is very useful, but I hava a question about it. Why the flattened relationship is readonly?

    Suppose the many-to-many relationship between student and course. The DataObject, Student, would have method addToCourses(Course obj). But this mothod can not be called to avoid CayenneRuntimeException is thrown. I think if this method can be called, i.e.,the flatten relationship is writable, the DataObject could be operated more convenient.


    8. Added support for flattened relationships. Modeller now suggests all available
    paths from the source entity to the destination entity for selection. For simple flattened
    relationships that span a many-many link table consisting solely of fk's to the linked rows,
    cayenne will automatically add/remove the link records. In that case, there is no need to
    have an ObjEntity for the link record, and this is in fact discouraged. All other flattened
    relationships are set "readOnly" and cannot be modified.


    Regards,



    This archive was generated by hypermail 2.0.0 : Fri Nov 22 2002 - 01:37:06 EST