|
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:
|
smime.p7s
Description: S/MIME Cryptographic Signature
