ODE
  1. ODE
  2. ODE-228

SQL scripts generated for Oracle

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1, 1.1.1, 1.2
    • Fix Version/s: 1.1.1
    • Component/s: Build System
    • Labels:
      None
    • Environment:
      Windows XP Pro, JDK 1.5.0.07, Oracle 10g XE, Apache Tomcat 5.5.25

      Description

      SQL scripts for differend databases are generated by simply merging OpenJPA/Hibernate generated scripts with hardcoded Sheduler script. Sheduler script is writted for derby database only and is merged in all database scripts. Due to this Oracle and possybly all other database scripts become incorrect.

        Activity

        Hide
        Matthieu Riou added a comment -

        I don't have Oracle installed at the moment, could you give a bit more detail on which parts of the script Oracle chokes on? Is it only the blob definition?

        A patch on dao-jpa-ojpa-derby/src/main/scripts/simplesched-oracle.sql would be very welcome

        Show
        Matthieu Riou added a comment - I don't have Oracle installed at the moment, could you give a bit more detail on which parts of the script Oracle chokes on? Is it only the blob definition? A patch on dao-jpa-ojpa-derby/src/main/scripts/simplesched-oracle.sql would be very welcome
        Hide
        Alexey Ousov added a comment - - edited

        I use the following oracle sheduler SQL script, I'm not sure if it is perfect, but it works.

        One more thing for this issue: hibernate generated script also can not be imported into database without editing. Again because of sheduler part, but there is also some other wrong parts.

        create table LARGE_DATA (ID number(19,0) not null, BIN_DATA blob(2G), INSERT_TIME timestamp, MLOCK number(10,0) not null, primary key (ID));

        should be
        create table LARGE_DATA (ID number(19,0) not null, BIN_DATA blob, INSERT_TIME timestamp, MLOCK number(10,0) not null, primary key (ID));

        And for
        create index IDX_BPEL_CORRELATOR_MESSAGE_CKEY on BPEL_CORRELATOR_MESSAGE_CKEY (CKEY);
        identifier is too long SQL error generated.

        I don't know if you plan to drop hibernate support, and I don't know if this script also generated automatically by hibernate (and then it is hibernate issue).

        Show
        Alexey Ousov added a comment - - edited I use the following oracle sheduler SQL script, I'm not sure if it is perfect, but it works. One more thing for this issue: hibernate generated script also can not be imported into database without editing. Again because of sheduler part, but there is also some other wrong parts. create table LARGE_DATA (ID number(19,0) not null, BIN_DATA blob(2G), INSERT_TIME timestamp, MLOCK number(10,0) not null, primary key (ID)); should be create table LARGE_DATA (ID number(19,0) not null, BIN_DATA blob, INSERT_TIME timestamp, MLOCK number(10,0) not null, primary key (ID)); And for create index IDX_BPEL_CORRELATOR_MESSAGE_CKEY on BPEL_CORRELATOR_MESSAGE_CKEY (CKEY); identifier is too long SQL error generated. I don't know if you plan to drop hibernate support, and I don't know if this script also generated automatically by hibernate (and then it is hibernate issue).
        Hide
        Matthieu Riou added a comment -

        Thanks for the patch!

        Yes we plan to drop Hibernate support at some point (not too soon though but gradually). I'm aware of the blob(2g) problem and yes it's an issue with Hibernate mappings. There's no way you can declare a blob in a way that will be mapped successfully for all tables. So we made it so that it works for Derby and MySQL first.

        Show
        Matthieu Riou added a comment - Thanks for the patch! Yes we plan to drop Hibernate support at some point (not too soon though but gradually). I'm aware of the blob(2g) problem and yes it's an issue with Hibernate mappings. There's no way you can declare a blob in a way that will be mapped successfully for all tables. So we made it so that it works for Derby and MySQL first.

          People

          • Assignee:
            Matthieu Riou
            Reporter:
            Alexey Ousov
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development