hi Chad!

great job! (...as this project!) I had tested the solution and I had found the following issues,

tests done:
1- check the character for the join: now works fine!, but I think it could be usefull to identify the associations, if the character "_" could be diferent than the one used for space Entity names. In this way we can identify then just reading.

2- with a very very long name, it removes some characters for the long name and links correctly to the table, but on the sql generation script fails:

    [java] 04-jun-2004 12:38:45 net.sf.hibernate.tool.hbm2ddl.SchemaExport main
    [java] GRAVE: Error creating schema
    [java] net.sf.hibernate.MappingException: Foreign key (HIB_CESTAS_PRODUCTOSMUUUUUYYYLARRR [CESTAS_PRODUCTOSMUUUUUYYYLARRR])) must have same number
 of columns as the referenced primary key (HIB_CESTAS_PRODUCTOSMUUUUUYYYLARRR [CESTAS_PRODUCTOSMUUUUUYYYLARRR,POLIZA_FK])
    [java]      at net.sf.hibernate.mapping.ForeignKey.setReferencedTable(ForeignKey.java:60)
    [java]      at net.sf.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:649)
    [java]      at net.sf.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:427)
    [java]      at net.sf.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:58)
    [java]      at net.sf.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:48)
    [java]      at net.sf.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:303)
    [java] net.sf.hibernate.MappingException: Foreign key (HIB_CESTAS_PRODUCTOSMUUUUUYYYLARRR [CESTAS_PRODUCTOSMUUUUUYYYLARRR])) must have same number
 of columns as the referenced primary key (HIB_CESTAS_PRODUCTOSMUUUUUYYYLARRR [CESTAS_PRODUCTOSMUUUUUYYYLARRR,POLIZA_FK])
    [java]      at net.sf.hibernate.mapping.ForeignKey.setReferencedTable(ForeignKey.java:60)
    [java]      at net.sf.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:649)
    [java]      at net.sf.hibernate.cfg.Configuration.generateDropSchemaScript(Configuration.java:427)
    [java]      at net.sf.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:58)
    [java]      at net.sf.hibernate.tool.hbm2ddl.SchemaExport.<init>(SchemaExport.java:48)
    [java]      at net.sf.hibernate.tool.hbm2ddl.SchemaExport.main(SchemaExport.java:303)

BUILD FAILED


in the hbm file for the long file name:
------------------------------------------------------------------------------------------------------
......
   <class
        name="com.hwsol.mis.server.datos.polizas.CestasProductosmuuuuuyyylarrrrgo"
        table="HIB_CESTAS_PRODUCTOSMUUUUUYYYLARRR"
        dynamic-update="false"
        dynamic-insert="false"
    >
.......
 <set
            name="poliza"
            table="HIB_CESTAS_PRODUCTOSMUUUUUYYYLARRR"
            lazy="true"
            inverse="false"
            cascade="none"
            sort="unsorted"
        >

              <key
                  column="CESTAS_PRODUCTOSMUUUUUYYYLARRR"
              />

              <many-to-many
                  class="com.hwsol.mis.server.datos.polizas.Poliza"
                  column="POLIZA_FK"
                  outer-join="auto"
              />

        </set>

in the hbm file for the other file

    <class
        name="com.hwsol.mis.server.datos.polizas.Poliza"
        table="HIB_POLIZA"
        dynamic-update="false"
        dynamic-insert="false"
    >
 <set
            name="cestasProductosmuuuuuyyylarrrrgo"
            table="HIB_CESTAS_PRODUCTOSMUUUUUYYYLARRR"
            lazy="true"
            inverse="false"
            cascade="none"
            sort="unsorted"
        >

              <key
                  column="POLIZA_FK"
              />

              <many-to-many
                  class="com.hwsol.mis.server.datos.polizas.CestasProductosmuuuuuyyylarrrrgo"
                  column="CESTAS_PRODUCTOSMUUUUUYYYLARRR"
                  outer-join="auto"
              />

        </set>

3- with a relation name set explicity in the model works everytthing well.

thanks!

Carlos Cuenca



Chad Brandon wrote:
Hey Carlos,
 
I fixed your bug in CVS, try it out and let me know if you still have problems.  Remember it takes 5-8 hours for anon cvs to catch up to developer CVS.
 
Thanks,
 
Chad
----- Original Message -----
Sent: Thursday, June 03, 2004 12:54 PM
Subject: Re: [Andromda-user] Association name error

I had submited the bug, but I don`t know you to assign to you!

Carlos Cuenca

Chad Brandon wrote:
Hi Carlos,

Can you file it as a bug and assign it to me?

Thanks,

Chad

----- Original Message ----- 
From: "Carlos Cuenca" <[EMAIL PROTECTED]>
To: "andromda-user" <[EMAIL PROTECTED]>
Sent: Tuesday, June 01, 2004 2:32 PM
Subject: [Andromda-user] Association name error


  
Hi,

I am using the Hibernate cartridge, and I had found that when I create a
association between two clasess and gave it a  name, it doesn't
proccess it, and the cartridge names the association with
    
HIB_Entity-Entity.
  
I also have a problem with this since SapDb object names are not allowed
for more than 30 characters, I had set the parameter at the
<physical.maxSqlNameLength>30</physical.maxSqlNameLength> at the
project.xml inside the MDA directory but  it does not take into account
this limitation when creating the names for the association tables.

is there any comment about this?

Carlos Cuenca

    



-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Andromda-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-user


  

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to