Announcement Announcement Module
Collapse
No announcement yet.
dbre mysql 'Foreign key table for foreign key' 'must not be null' Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • dbre mysql 'Foreign key table for foreign key' 'must not be null'

    Given the following mysql database definition for user 'sa' and no password:
    Code:
    -- DROP SCHEMA IF EXISTS rootest;
    
    -- CREATE SCHEMA rootest DEFAULT CHARACTER SET utf8;
    
    -- USE rootest;
    
    DROP TABLE IF EXISTS TeamPlayer;
    DROP TABLE IF EXISTS Player;
    DROP TABLE IF EXISTS Team;
    DROP TABLE IF EXISTS PlayerStatusType;
    DROP TABLE IF EXISTS User;
    
    -- =================================
    
    CREATE TABLE User
      (
        id 	bigint auto_increment PRIMARY KEY
      )
     ENGINE = InnoDB;
    
    -- ================================
    
    CREATE TABLE PlayerStatusType
      (
        type  varchar(63) PRIMARY KEY
      )
     ENGINE = InnoDB;
    
    -- ===============================
    
    CREATE TABLE Team
      (
        id       bigint auto_increment,
        city     varchar(127)   not null,
        name     varchar(127)   not null,
        version  int,
    
        primary key(id),
        unique(city, name)
      )
     ENGINE = InnoDB;
    
    -- ================================
    
    CREATE TABLE Player
      (
        id         bigint auto_increment,
        firstName  varchar(63),
        lastName   varchar(63)   not null,
        birthdate  date          not null,
        statusType varchar(63)   not null,
        version    int,
    
        primary key(id),
        
        foreign key(statusType) references PlayerStatusType(type)
      )
     ENGINE = InnoDB;
    
    -- ===================================
    
    CREATE TABLE TeamPlayer
      (
        teamId    bigint,
        playerId  bigint,
        fromDate  date,
        toDate    date,
        version   int,
    
        primary key(teamId, playerId, fromDate),
    
        foreign key(teamId) references Team(id),
        foreign key(playerId) references Player(id)
      )
     ENGINE = InnoDB;
    
    -- ===================================
    and the following roo project scripts:
    Code:
    // Create project
    
    project --topLevelPackage com.roodbtest
    
    // Setup database
    
    persistence setup --provider HIBERNATE --database MYSQL
    database properties set --key database.url --value jdbc:mysql://localhost:3306/rootest
    database properties set --key database.username --value sa
    
    database properties list
    edit persistence.xml changing hibernate.hbm2ddl.auto value to 'validate'
    Code:
    // database reverse engineer
    
    ///////////
    
    database reverse engineer --schema rootest --package ~.domain --testAutomatically
    the following output results:
    Code:
    Created SRC_MAIN_RESOURCES/dbre.xml
    Updated ROOT/pom.xml
    Updated SRC_MAIN_RESOURCES/META-INF/persistence.xml
    Created SRC_MAIN_JAVA/com/roodbtest/domain
    Created SRC_MAIN_JAVA/com/roodbtest/domain/Player.java
    Created SRC_MAIN_JAVA/com/roodbtest/domain/PlayerStatusType.java
    Created SRC_MAIN_JAVA/com/roodbtest/domain/Team.java
    Created SRC_MAIN_JAVA/com/roodbtest/domain/TeamPlayerPK.java
    Created SRC_MAIN_JAVA/com/roodbtest/domain/TeamPlayer.java
    Created SRC_MAIN_JAVA/com/roodbtest/domain/User.java
    Undo create SRC_MAIN_JAVA/com/roodbtest/domain/User.java
    Undo create SRC_MAIN_JAVA/com/roodbtest/domain/TeamPlayer.java
    Undo create SRC_MAIN_JAVA/com/roodbtest/domain/TeamPlayerPK.java
    Undo create SRC_MAIN_JAVA/com/roodbtest/domain/Team.java
    Undo create SRC_MAIN_JAVA/com/roodbtest/domain/PlayerStatusType.java
    Undo create SRC_MAIN_JAVA/com/roodbtest/domain/Player.java
    Undo create SRC_MAIN_JAVA/com/roodbtest/domain
    Undo manage SRC_MAIN_RESOURCES/META-INF/persistence.xml
    Undo manage ROOT/pom.xml
    Undo create SRC_MAIN_RESOURCES/dbre.xml
    Foreign key table for foreign key 'player_ibfk_1' in table 'Player' must not be null in determining a one-to-one relationship
    Script required 2 second(s) to execute
    Script execution aborted
    Created SRC_MAIN_JAVA/com/roodbtest/domain
    Created SRC_MAIN_JAVA/com/roodbtest/domain/Player_Roo_Entity.aj
    Deleted SRC_MAIN_JAVA/com/roodbtest/domain/Player_Roo_Entity.aj
    This is a very simple database structure.
    Why does roo have a problem?
    Is this a roo defect?
    Am I missing a step or doing something incorrect?

    I am using roo 1.1.4.

  • #2
    Your schema worked OK for me. No errors in the generation:
    Code:
    roo> database reverse engineer --schema no-schema-required --package ~.domain --testAutomatically 
    Created SRC_MAIN_RESOURCES/dbre.xml
    Created SRC_MAIN_JAVA/com/foo/empty/domain
    Created SRC_MAIN_JAVA/com/foo/empty/domain/Player.java                                                                         
    Created SRC_MAIN_JAVA/com/foo/empty/domain/PlayerStatusType.java
    Created SRC_MAIN_JAVA/com/foo/empty/domain/Team.java
    Created SRC_MAIN_JAVA/com/foo/empty/domain/TeamPlayerPK.java
    Created SRC_MAIN_JAVA/com/foo/empty/domain/TeamPlayer.java
    Created SRC_MAIN_JAVA/com/foo/empty/domain/User.java
    Created SRC_TEST_JAVA/com/foo/empty/domain
    Created SRC_TEST_JAVA/com/foo/empty/domain/PlayerDataOnDemand.java
    Created SRC_TEST_JAVA/com/foo/empty/domain/PlayerIntegrationTest.java
    Created SRC_TEST_JAVA/com/foo/empty/domain/PlayerStatusTypeDataOnDemand.java
    Created SRC_TEST_JAVA/com/foo/empty/domain/PlayerStatusTypeIntegrationTest.java
    Created SRC_TEST_JAVA/com/foo/empty/domain/TeamDataOnDemand.java
    Created SRC_TEST_JAVA/com/foo/empty/domain/TeamIntegrationTest.java
    Created SRC_TEST_JAVA/com/foo/empty/domain/TeamPlayerDataOnDemand.java
    Created SRC_TEST_JAVA/com/foo/empty/domain/TeamPlayerIntegrationTest.java
    Created SRC_TEST_JAVA/com/foo/empty/domain/UserDataOnDemand.java
    Created SRC_TEST_JAVA/com/foo/empty/domain/UserIntegrationTest.java
    Created SRC_MAIN_JAVA/com/foo/empty/domain/Player_Roo_Configurable.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/Player_Roo_Entity.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/Player_Roo_DbManaged.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/Player_Roo_ToString.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/PlayerStatusType_Roo_Configurable.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/PlayerStatusType_Roo_Entity.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/PlayerStatusType_Roo_ToString.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/Team_Roo_Configurable.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/Team_Roo_Entity.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/Team_Roo_DbManaged.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/Team_Roo_ToString.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/TeamPlayer_Roo_Configurable.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/TeamPlayer_Roo_Entity.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/TeamPlayerPK_Roo_Configurable.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/TeamPlayerPK_Roo_Identifier.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/TeamPlayerPK_Roo_Json.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/TeamPlayerPK_Roo_Serializable.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/TeamPlayer_Roo_DbManaged.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/TeamPlayer_Roo_ToString.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/User_Roo_Configurable.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/User_Roo_Entity.aj
    Created SRC_MAIN_JAVA/com/foo/empty/domain/User_Roo_ToString.aj
    Created SRC_TEST_JAVA/com/foo/empty/domain/UserDataOnDemand_Roo_Configurable.aj
    Created SRC_TEST_JAVA/com/foo/empty/domain/UserDataOnDemand_Roo_DataOnDemand.aj
    Created SRC_TEST_JAVA/com/foo/empty/domain/TeamPlayerIntegrationTest_Roo_Configurable.aj
    Created SRC_TEST_JAVA/com/foo/empty/domain/TeamDataOnDemand_Roo_DataOnDemand.aj
    Created SRC_TEST_JAVA/com/foo/empty/domain/PlayerStatusTypeDataOnDemand_Roo_DataOnDemand.aj
    Created SRC_TEST_JAVA/com/foo/empty/domain/PlayerDataOnDemand_Roo_DataOnDemand.aj
    Created SRC_TEST_JAVA/com/foo/empty/domain/TeamPlayerDataOnDemand_Roo_DataOnDemand.aj
    Created SRC_TEST_JAVA/com/foo/empty/domain/TeamPlayerIntegrationTest_Roo_IntegrationTest.aj
    Created SRC_TEST_JAVA/com/foo/empty/domain/PlayerStatusTypeDataOnDemand_Roo_Configurable.aj
    Created SRC_TEST_JAVA/com/foo/empty/domain/TeamPlayerDataOnDemand_Roo_Configurable.aj
    Created SRC_TEST_JAVA/com/foo/empty/domain/TeamIntegrationTest_Roo_Configurable.aj
    Created SRC_TEST_JAVA/com/foo/empty/domain/TeamIntegrationTest_Roo_IntegrationTest.aj
    Created SRC_TEST_JAVA/com/foo/empty/domain/TeamDataOnDemand_Roo_Configurable.aj
    Created SRC_TEST_JAVA/com/foo/empty/domain/PlayerIntegrationTest_Roo_Configurable.aj
    Created SRC_TEST_JAVA/com/foo/empty/domain/PlayerIntegrationTest_Roo_IntegrationTest.aj
    Created SRC_TEST_JAVA/com/foo/empty/domain/PlayerDataOnDemand_Roo_Configurable.aj
    Created SRC_TEST_JAVA/com/foo/empty/domain/PlayerStatusTypeIntegrationTest_Roo_Configurable.aj
    Created SRC_TEST_JAVA/com/foo/empty/domain/PlayerStatusTypeIntegrationTest_Roo_IntegrationTest.aj
    Created SRC_TEST_JAVA/com/foo/empty/domain/UserIntegrationTest_Roo_Configurable.aj
    Created SRC_TEST_JAVA/com/foo/empty/domain/UserIntegrationTest_Roo_IntegrationTest.aj
    Can you reproduce this every time? Can you start again with a clean empty project?

    Comment


    • #3
      I have tried numerous times with no success.
      Each time I exit roo and clean the directory of all files.
      I have run the commands from within a script as well as individually on the command line.
      I even changed the primary keys to be all BigInt. Same result every time.

      I am using OS X 10.5.8, java 1.6.0_24.

      Comment


      • #4
        What happens when you run the database introspect command? Do you see the XML of the schema? If so, use the --file option on this command and attach the output here

        Comment


        • #5
          roo> database introspect --schema rootest
          Code:
          <?xml version="1.0" encoding="UTF-8" standalone="no"?>
          <!--WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.-->
          <database name="rootest">
              <option key="testAutomatically" value="false"/>
              <option key="includeNonPortableAttributes" value="true"/>
              <table name="Particpant">
                  <column name="id" primaryKey="true" required="true" scale="0" size="19" type="-5,BIGINT"/>
                  <unique name="PRIMARY">
                      <unique-column name="id"/>
                  </unique>
              </table>
              <table name="Player">
                  <column name="id" primaryKey="true" required="true" scale="0" size="19" type="-5,BIGINT"/>
                  <column name="firstName" primaryKey="false" required="false" scale="0" size="63" type="12,VARCHAR"/>
                  <column name="lastName" primaryKey="false" required="true" scale="0" size="63" type="12,VARCHAR"/>
                  <column name="birthdate" primaryKey="false" required="true" scale="0" size="10" type="91,DATE"/>
                  <column name="statusType" primaryKey="false" required="true" scale="0" size="63" type="12,VARCHAR"/>
                  <column name="version" primaryKey="false" required="false" scale="0" size="10" type="4,INT"/>
                  <foreign-key foreignTable="playerstatustype" name="player_ibfk_1" onDelete="none" onUpdate="none">
                      <option key="exported" value="false"/>
                      <reference foreign="type" local="statusType"/>
                  </foreign-key>
                  <foreign-key foreignTable="TeamPlayer" name="teamplayer_ibfk_2" onDelete="none" onUpdate="none">
                      <option key="exported" value="true"/>
                      <reference foreign="playerId" local="id"/>
                  </foreign-key>
                  <unique name="PRIMARY">
                      <unique-column name="id"/>
                  </unique>
                  <index name="statusType">
                      <index-column name="statusType"/>
                  </index>
              </table>
              <table name="PlayerStatusType">
                  <column name="type" primaryKey="true" required="true" scale="0" size="63" type="12,VARCHAR"/>
                  <foreign-key foreignTable="Player" name="player_ibfk_1" onDelete="none" onUpdate="none">
                      <option key="exported" value="true"/>
                      <reference foreign="statusType" local="type"/>
                  </foreign-key>
                  <unique name="PRIMARY">
                      <unique-column name="type"/>
                  </unique>
              </table>
              <table name="Team">
                  <column name="id" primaryKey="true" required="true" scale="0" size="19" type="-5,BIGINT"/>
                  <column name="city" primaryKey="false" required="true" scale="0" size="127" type="12,VARCHAR"/>
                  <column name="name" primaryKey="false" required="true" scale="0" size="127" type="12,VARCHAR"/>
                  <column name="version" primaryKey="false" required="false" scale="0" size="10" type="4,INT"/>
                  <foreign-key foreignTable="TeamPlayer" name="teamplayer_ibfk_1" onDelete="none" onUpdate="none">
                      <option key="exported" value="true"/>
                      <reference foreign="teamId" local="id"/>
                  </foreign-key>
                  <unique name="PRIMARY">
                      <unique-column name="id"/>
                  </unique>
                  <unique name="city">
                      <unique-column name="city"/>
                      <unique-column name="name"/>
                  </unique>
              </table>
              <table name="TeamPlayer">
                  <column name="teamId" primaryKey="true" required="true" scale="0" size="19" type="-5,BIGINT"/>
                  <column name="playerId" primaryKey="true" required="true" scale="0" size="19" type="-5,BIGINT"/>
                  <column name="fromDate" primaryKey="true" required="true" scale="0" size="10" type="91,DATE"/>
                  <column name="toDate" primaryKey="false" required="false" scale="0" size="10" type="91,DATE"/>
                  <column name="version" primaryKey="false" required="false" scale="0" size="10" type="4,INT"/>
                  <foreign-key foreignTable="team" name="teamplayer_ibfk_1" onDelete="none" onUpdate="none">
                      <option key="exported" value="false"/>
                      <reference foreign="id" local="teamId"/>
                  </foreign-key>
                  <foreign-key foreignTable="player" name="teamplayer_ibfk_2" onDelete="none" onUpdate="none">
                      <option key="exported" value="false"/>
                      <reference foreign="id" local="playerId"/>
                  </foreign-key>
                  <unique name="PRIMARY">
                      <unique-column name="teamId"/>
                      <unique-column name="playerId"/>
                      <unique-column name="fromDate"/>
                  </unique>
                  <index name="playerId">
                      <index-column name="playerId"/>
                  </index>
              </table>
          </database>
          I should have looked at this output earlier. The status table is 'PlayerStatusType' and the foreign key table in player is pointing to 'playerstatustype'. According to MySQL, on os x, tables are stored with case sensitivity but compared as lower case. However, one must not mix case within a single statement.
          From mysql command line, I can query a table in upper or lower case.

          I will convert all table names to lower case and try again.
          If that does not work, I will convert all field names to lower case.

          Comment


          • #6
            Conversion of table names to lower case results in correct output.

            However, I should be able to have my table names in the case of my choosing.
            Another downside to lower case table names is the resulting class names. For example, table 'teamplayer' becomes Teamplayer.java whereas table 'TeamPlayer' becomes TeamPlayer.java.

            For reasons that may be shallow and superficial, I would like to have my table names the same as my pojo names. Maybe this is just aesthetics, but I prefer to avoid the underscore separator, 'team_player' in table names. It makes searching through documentation simpler as one has a single name for all aspects of an entity.

            Should this roo shortcoming be entered as bug?

            Comment


            • #7
              Underscores in table names is very common and unless your table has one of these characters, or a hyphen, back or forward slash, or period, DBRE has no way of determining where to split the word. Also DBRE uses the java.sql.DatabaseMetaData.storesLowerCaseIdentifie rs() and java.sql.DatabaseMetaData.storesUpperCaseIdentifie rs() methods to determine how to handle generation of table names, however, MySQL stores mixed case identifiers so I don't understand your problem as it generated the entities for me with no errors from the outset. My dbre.xml has the correct case for the foreign key PlayerStatusType (in mixed case) where as yours in is in lowercase, hence your error.

              What version of MySQL are you using?

              Comment


              • #8
                mysql> status;
                --------------
                mysql Ver 14.14 Distrib 5.1.49, for apple-darwin9.8.0 (i386) using readline 5.1

                Connection id: 71
                Current database: rootest
                Current user: sa@localhost
                SSL: Not in use
                Current pager: stdout
                Using outfile: ''
                Using delimiter: ;
                Server version: 5.1.49-log MySQL Community Server (GPL)
                Protocol version: 10
                Connection: Localhost via UNIX socket
                Server characterset: latin1
                Db characterset: utf8
                Client characterset: latin1
                Conn. characterset: latin1
                UNIX socket: /tmp/mysql.sock
                Uptime: 37 days 1 hour 42 min 26 sec

                Comment


                • #9
                  Hi there,


                  I have the same kind of error but I didn't find the solution ... do anyone has an idea of the source of the trouble ?

                  Code:
                  java.lang.IllegalStateException: java.lang.IllegalArgumentException: Foreign key table for foreign key 'FK_T_ASSO_C_ASSO_CLI__T_CLIENT' in table 'T_ASSO_CLI_FAC' must not be null in determining a one-to-one relationship
                  On my side, all tables and columns names are upper-case ...
                  I work with an Oracle data base.

                  I use :
                  - ojdbc14_g.jar version 10.2.0.5.0
                  - SpringSource Tool Suite Version: 2.6.1.RELEASE
                  - Roo Suport : Roo 1.2.0.BUILD-SNAPSHOT


                  Thanks for helping.


                  CÚdric.
                  Last edited by Cedric.Vidrequin; Jun 7th, 2011, 08:59 AM.

                  Comment


                  • #10
                    Please attach your Oracle schema DDL if possible

                    Comment


                    • #11
                      Hello Alan,

                      thx for attention !

                      Two things :
                      1. I cannot print here my schema because it is professional ...
                      2. I solved the problem by closing STS and re starting it ... I don't know why it didn't work before and why it works now ...

                      Thanks again for attention.

                      Best regards.


                      CÚdric.

                      Comment


                      • #12
                        Solved: dbre mysql 'Foreign key table for foreign key' 'must not be null'

                        As it turns out the problem was related to OS X and its lack of a case sensitive file system. OS X (I have 10.5.8) only appears to have a case sensitive file system but in fact it does not.
                        Try this:
                        Code:
                        $ touch test
                        $ ls
                        $ touch Test
                        $ ls
                        Disappointingly, OS X will change the file from 'test' to 'Test' but only one file will exist.
                        This can be changed by modifying the file system _prior_ to operating system installation. I was not about to do this so I looked to MySQL for options.
                        Code:
                        mysql> show variables;
                        Where the important lines are:
                        Code:
                        lower_case_file_system                  ON                                                                                        
                        lower_case_table_names                2
                        In this state, tables could be queried in lower or upper case.
                        I added the following line to /etc/my.cnf
                        Code:
                        lower_case_table_names=0
                        restarted mysql server. Tables could only be queried in lower case. I dropped the database and recreated it. Tables can only be queried in the case they were created in (with some leeway).

                        Running the above roo scripts produces expected output and no errors.

                        Note:
                        I experienced a name conflict in one of the MySQL auto generated names for foreign keys. I had to specify the name of the foreign key using the 'constraint' key word.

                        It is interesting in the database introspect output (from a previous post) that some of the table names identified in foreign keys were lower case and others matched the case of the table names.

                        Comment


                        • #13
                          I have the same problem and I didn't finder the solution

                          Code :

                          Foreign key table for foreign key 'XXXXXX' in table 'XXXXXX' must not be null in determining a one-to-one relationship

                          and also :

                          Type 'com.XXXXXX.XXXXXX.XXXXXX' for table 'CXXXX' is not database managed (not annotated with @RooDbManaged)


                          dbre.xml:
                          <?xml version="1.0" encoding="UTF-8" standalone="no"?>
                          <!--WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.-->
                          <database name="XXXX">
                          <option key="testAutomatically" value="false"/>
                          <option key="includeNonPortableAttributes" value="false"/>
                          <table name="XXXXXX">
                          <column name="XXXXX" primaryKey="false" required="true" scale="0" size="2" type="3,NUMBER"/>
                          <column name="XXXXXXX" primaryKey="false" required="true" scale="-127" size="0" type="3,NUMBER"/>
                          <column name="XXXXXX" primaryKey="false" required="false" scale="0" size="7" type="93,DATE"/>
                          <column name="XXXXX" primaryKey="true" required="true" scale="0" size="6" type="3,NUMBER"/>
                          <column name="XX" primaryKey="true" required="true" scale="0" size="3" type="12,VARCHAR2"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="0" size="40" type="12,VARCHAR2"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="0" size="40" type="12,VARCHAR2"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="0" size="20" type="12,VARCHAR2"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="0" size="2" type="12,VARCHAR2"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="0" size="2" type="12,VARCHAR2"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="0" size="5" type="12,VARCHAR2"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="0" size="40" type="12,VARCHAR2"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="0" size="20" type="12,VARCHAR2"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="0" size="2" type="12,VARCHAR2"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="0" size="2" type="12,VARCHAR2"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="0" size="5" type="12,VARCHAR2"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="0" size="15" type="12,VARCHAR2"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="0" size="15" type="12,VARCHAR2"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="0" size="15" type="12,VARCHAR2"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="0" size="15" type="12,VARCHAR2"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="0" size="5" type="12,VARCHAR2"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="0" size="3" type="12,VARCHAR2"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="0" size="7" type="93,DATE"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="0" size="11" type="3,NUMBER"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="2" size="14" type="3,NUMBER"/>
                          <column name="XXXXXXX" primaryKey="false" required="false" scale="0" size="35" type="12,VARCHAR2"/>
                          <foreign-key foreignTable="XXXXXXX" name="XXXXXXX" onDelete="restrict" onUpdate="cascade">
                          <option key="exported" value="true"/>
                          <reference foreign="XXXXXXX" local="XXXXXXX"/>
                          <reference foreign="XXXXXXX" local="XXXXXXX"/>
                          </foreign-key>
                          <foreign-key foreignTable="XXXXXXX" name="XXXXXXX" onDelete="restrict" onUpdate="cascade">
                          <option key="exported" value="true"/>
                          <reference foreign="XXXXXXX" local="XXXXXXX"/>
                          <reference foreign="XXXXXXX" local="XXXXXXX"/>
                          </foreign-key>
                          <unique name="XXXXXXX">
                          <unique-column name="XXXXXXX"/>
                          <unique-column name="XXXXXXX"/>
                          </unique>
                          <unique name="XXXXXXX">
                          <unique-column name="XXXXXXX"/>
                          <unique-column name="XXXXXXX"/>
                          </unique>
                          <index name="XXXXXXX">
                          <index-column name="XXXXXXX"/>
                          </index>
                          <index name="XXXXXXX">
                          <index-column name="XXXXXXX"/>
                          <index-column name="XXXXXXX"/>
                          </index>
                          <index name="XXXXXXX">
                          <index-column name="XXXXXXX"/>
                          <index-column name="XXXXXXX"/>
                          </index>
                          <index name="XXXXXXX">
                          <index-column name="XXXXXXX"/>
                          <index-column name="XXXXXXX"/>
                          </index>
                          <index name="XXXXXXX">
                          <index-column name="XXXXXXX"/>
                          </index>
                          </table>
                          </database>



                          I'm using Roo 1.1.5 and database Oracle
                          Last edited by Karina; Sep 2nd, 2011, 12:13 PM. Reason: privacity

                          Comment


                          • #14
                            It appears your Clientes type does not have the @RooDbManaged annotation on it. This would prevent the fields from being created hence your FK issue.

                            Comment


                            • #15
                              Thanks for you Reply,

                              And How I can fix this?
                              I need help

                              What I have to do for that not delete the class . java and the others?

                              for example:
                              Code:
                              Created SRC_MAIN_JAVA\com\...
                              Created SRC_MAIN_JAVA\com\...
                              Created SRC_MAIN_JAVA\com\...
                              Deleted SRC_MAIN_JAVA\com\...
                              Deleted SRC_MAIN_JAVA\com\...
                              Deleted SRC_MAIN_JAVA\com\...
                              Last edited by Karina; Aug 30th, 2011, 06:58 AM. Reason: m

                              Comment

                              Working...
                              X