Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Milestone 1.2
    • Fix Version/s: Milestone 1.3
    • Component/s: None
    • Labels:
      None

      Description

      • feed entry transaction for feed service

        Activity

        Hide
        Misu added a comment -

        Hi

        About Peter comment MySQLIntegrityConstraintViolationException

        I just look in the mysql script and I found the :

        CREATE TABLE CEQACTION (
        CONTROLLED_ACTION INT NOT NULL,
        INFORMATION_ID INT NOT NULL,
        PERSON_ID INT NOT NULL,
        LOG_ID INT NOT NULL,
        FOREIGN KEY (INFORMATION_ID) REFERENCES INFORMATION_CEQ (INFORMATION_ID),
        FOREIGN KEY (PERSON_ID) REFERENCES PERSON_CEQ (PERSON_ID)
        – FOREIGN KEY (LOG_ID) REFERENCES ACTION_DATA (ACTION_LOG_ID)
        );

        on my script is on the line 548

        this script part builds a a table and sets a relation with other tables (INFORMATION_ID and PERSON_ID). This is perfect legal, but, the corresponding java model does not supports this relation. The next code snippet shows the CEQACTION properties.

        @Id
        @Column(name = "LOG_ID") private int nLogID;
        @Column(name = "CONTROLLED_ACTION") private int nControledAction;
        @Column(name = "INFORMATION_ID") private int nInfoID;
        @Column(name = "PERSON_ID") private int nPersonID;

        As si easy to see here - no relation is defined (none of the relation annotation is used). In my opinion this can cause the problem early described by Peter. More precisely, the ORM framework is responsible for the generating the primary key and the foreign key also- so the nInfoID and the nPersonID integer properties must be replaced with the proper relation. The actual implementation gets this responsibility from the ORM framework and replace it with its own code.

        The solution can look like this :

        E.G.

        @OneToOne
        @JoinColumn(name="INFORMATION_ID")
        Information information;

        @OneToOne
        @JoinColumn(name="PERSON_ID")
        Person person;

        For the moment I am not sure if the relation must be uni or bidirectional.

        Because this can cause some side effects I will try to fix this in a separate branch. I also think that this problem is a different bug than one described in this JIRA report (424) and I will generate an other one.

        Show
        Misu added a comment - Hi About Peter comment MySQLIntegrityConstraintViolationException I just look in the mysql script and I found the : CREATE TABLE CEQACTION ( CONTROLLED_ACTION INT NOT NULL, INFORMATION_ID INT NOT NULL, PERSON_ID INT NOT NULL, LOG_ID INT NOT NULL, FOREIGN KEY (INFORMATION_ID) REFERENCES INFORMATION_CEQ (INFORMATION_ID), FOREIGN KEY (PERSON_ID) REFERENCES PERSON_CEQ (PERSON_ID) – FOREIGN KEY (LOG_ID) REFERENCES ACTION_DATA (ACTION_LOG_ID) ); on my script is on the line 548 this script part builds a a table and sets a relation with other tables (INFORMATION_ID and PERSON_ID). This is perfect legal, but, the corresponding java model does not supports this relation. The next code snippet shows the CEQACTION properties. @Id @Column(name = "LOG_ID") private int nLogID; @Column(name = "CONTROLLED_ACTION") private int nControledAction; @Column(name = "INFORMATION_ID") private int nInfoID; @Column(name = "PERSON_ID") private int nPersonID; As si easy to see here - no relation is defined (none of the relation annotation is used). In my opinion this can cause the problem early described by Peter. More precisely, the ORM framework is responsible for the generating the primary key and the foreign key also- so the nInfoID and the nPersonID integer properties must be replaced with the proper relation. The actual implementation gets this responsibility from the ORM framework and replace it with its own code. The solution can look like this : E.G. @OneToOne @JoinColumn(name="INFORMATION_ID") Information information; @OneToOne @JoinColumn(name="PERSON_ID") Person person; For the moment I am not sure if the relation must be uni or bidirectional. Because this can cause some side effects I will try to fix this in a separate branch. I also think that this problem is a different bug than one described in this JIRA report (424) and I will generate an other one.
        Hide
        DmitryRyashchentsev added a comment -

        Fixed problem with INFORMATION_ID=0, the problem was with deattaching of removed info objects.

        There are also some EJB3 effects that causes exceptions, I created a new ticket for them COMMUNITY_EQUTY-426.
        I workarounded some of the "effects", but not all, I need a help.

        Show
        DmitryRyashchentsev added a comment - Fixed problem with INFORMATION_ID=0, the problem was with deattaching of removed info objects. There are also some EJB3 effects that causes exceptions, I created a new ticket for them COMMUNITY_EQUTY-426. I workarounded some of the "effects", but not all, I need a help.
        Hide
        DmitryRyashchentsev added a comment -

        The problem with MySQLIntegrityConstraintViolationException is deeper here, and I already fixed.

        Show
        DmitryRyashchentsev added a comment - The problem with MySQLIntegrityConstraintViolationException is deeper here, and I already fixed.
        Hide
        PRE added a comment -

        resolved - for future tuning we should open a new ticket

        Show
        PRE added a comment - resolved - for future tuning we should open a new ticket
        Hide
        PRE added a comment -

        closed all ticket for Milestone Release 1.3

        Show
        PRE added a comment - closed all ticket for Milestone Release 1.3

          People

          • Assignee:
            Misu
            Reporter:
            PRE
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: