Re: Missing DbAttribute

From: cay dabbler (xsd..uvip.com)
Date: Thu Jul 27 2006 - 13:53:01 EDT

  • Next message: Mike Kienenberger: "Re: Missing DbAttribute"

    Andrus,
    Thanks for your quick reply. I am frustrated with a whole host of
    velocity2ejb generators. I find Cayenne more useful for my purpose even
    though it does not make grand claims - as the other generators do.

    I am using Cayenne to generate EJB 3.0, JSF and Webservice – true, and a
    whole load of other stuff. I am particularly attracted to Cayenne
    inheritance facilities.

    I do want to map DbAttributes to the corresponding ObjAttributes, but I
    don't know what I am doing wrong.

    Scenario:
    1 In my database schema
    a) I have CONSTRAINT FK_FOO1_TABLE_1 FOREIGN KEY(ID) REFERENCES
    FOO2_TABLE(D));

    2. In Cayenne
    a) I make Foo1 the superclass of Foo2
    b). FOO1_TABLE has a row defined: NAME=toFoo2Table , TARGET=FOO2_TABLE, To
    Dep PK= true;

    Problem:
    I don't know why (2b) is necessary. Anyway, I deleted the row and that's
    when my problem started. If I don't remove it, I get something like:

    Class Foo1{
    private Foo2 toFoo2; // UGLY, DON'T WANT THIS
    }
    Class Foo2 extends Foo1{
    }

    One more thing:
    In the Cayenne API doc, The ObjAttribute class has:
    DbAttribute getDbAttribute();

    It would be nice to have in the DBAttribute: class
    ObjAttribute getObjAttribute();

    Phew!

    -- 
    View this message in context: http://www.nabble.com/Missing-DbAttribute-tf2008259.html#a5526020
    Sent from the Cayenne - User forum at Nabble.com.
    



    This archive was generated by hypermail 2.0.0 : Thu Jul 27 2006 - 13:53:24 EDT