Re: [Wonder-disc] EO model validation with Wonder and foreign keys

From: Chuck Hill (chil..lobal-village.net)
Date: Tue Dec 12 2006 - 19:59:24 EST

  • Next message: Zak Burke: "Re: [Wonder-disc] EO model validation with Wonder and foreign keys"

    On Dec 12, 2006, at 4:32 PM, Zak Burke wrote:

    > I thought I would bite the bullet and install Wonder, to see if it
    > made
    > all my EO Model/Entity Modeler validation issues magically disappear.
    > I've written about this problem before but was never able to
    > resolve it.
    > Here it is, in a nutshell: When an EO has a required relation, Entity
    > Modeler complains if the EO's foreign key is not also marked as
    > required. EOF, however, chokes when the foreign key is required
    > because
    > it handles validation before a new related object has been persisted,
    > and therefore has no foreign key to assign.

    You sure that is EOF choking, not the database? Sometimes EOF orders
    operations in a, er, unfortunate order. If your database supports
    its, the solution is to mark the FK constraints as DEFERRABLE
    INITIALLY DEFERRED.

    Chuck

    >
    > There appears to be a great deal of validation-oriented code in
    > Wonder,
    > but lacking an introduction, I'm not sure where to start. Validity
    > Modeler seemed like a potential option as well; alas, its help link is
    > broken (This URL has been moved temporarily to <a
    > HREF="file://null">file://null>).
    >
    > Can anybody point me in the right direction? Is this something Wonder
    > handles (if only I can figure out how to tell it what to do) or is
    > this
    > the kind of thing you write EOModel delegates to work around? This
    > seems
    > pretty basic, but I'm totally lost.
    >
    > Thanks,
    >
    > zak.
    >
    > ----------------------------------------------------------------------
    > ---
    > Take Surveys. Earn Cash. Influence the Future of IT
    > Join SourceForge.net's Techsay panel and you'll get the chance to
    > share your
    > opinions on IT & business topics through brief surveys - and earn cash
    >
    http://www.techsay.com/default.php?
    > page=join.php&p=sourceforge&CID=DEVDEV
    > _______________________________________________
    > Wonder-disc mailing list
    > Wonder-dis..ists.sourceforge.net
    > https://lists.sourceforge.net/lists/listinfo/wonder-disc
    >

    -- 
    

    Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects



    This archive was generated by hypermail 2.0.0 : Tue Dec 12 2006 - 19:59:33 EST