Re: flattened relations intermediate table records not deleted with cascade

From: Dmitry Gritsenko (dim..kreative.com)
Date: Sat Feb 05 2005 - 04:50:05 EST

  • Next message: Andrus Adamchik: "Cayenne 1.2 M2 is out"

    Thank you, Andrus.

    ----- Original Message -----
    From: "Andrus Adamchik" <andru..bjectstyle.org>
    To: <cayenne-use..bjectstyle.org>
    Sent: Saturday, February 05, 2005 4:17 AM
    Subject: Re: flattened relations intermediate table records not deleted with
    cascade

    > 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 : Sat Feb 05 2005 - 08:31:47 EST