Re: flattened relations intermediate table records not deleted with cascade

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Feb 04 2005 - 21:17:18 EST

  • Next message: Andrus Adamchik: "Re: Cayenne DataContext plus Axis session"

    Hi Dmitry,

    Three-way flattened relationships currently are not supported in
    Cayenne. The best option for you is to map "assesment_result" jointable
    as an independent ObjEntity, and handle it as such in the Java code.

    Andrus

    On Feb 2, 2005, at 5:09 AM, Gritsenko Dmitry wrote:

    > Hi Andrus and all willing to help out,
    >
    > We have got a shema of 3 tables:
    >
    > assessment
    > question
    > criteria
    > and a linking table assessment_result (linking 3 above tables) that we
    > have
    > flattened.
    >
    > The java code and xml mapping to follow, but as well as the query log.
    > In 2 words the problem is: while inserting the flattened table data
    > assessment id turns out to be NULL. Please, HELP !!!
    >
    > Query log:
    > ===================================
    >
    > INFO [http8080-Processor4 02-02 12:07:06] QueryLogger: INSERT INTO
    > assessment_result (ID, assessment_id, criteria_id, q
    > uestion_id) VALUES (?, ?, ?, ?)
    > INFO [http8080-Processor4 02-02 12:07:06] QueryLogger: [bind: 360,
    > NULL, 1,
    > 1]
    > INFO [http8080-Processor4 02-02 12:07:06] QueryLogger: *** error.
    > java.sql.SQLException: General error, message from server: "Column
    > 'assessment_id' cannot be null"
    > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1962)



    This archive was generated by hypermail 2.0.0 : Fri Feb 04 2005 - 21:17:24 EST