max wrote:
the missing properties issue i would like some more explanation for ... a testcase maybe ?
;max
SQLServer Table create:
***********************
CREATE TABLE [dbo].[TARE] (
[ROWID] [int] IDENTITY (1, 1) NOT NULL ,
[ID] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[BOL_ID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
************************
Genrated mapping Tare.hbm.xml
***************************
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<!--
Auto-generated mapping file from
the hibernate.org cfg2hbm engine
-->
<class name="com.nomogen.hibernate.ssve638.Tare" table="TARE" schema="dbo" catalog="ssve638">
<id name="id" type="string">
<column name="ID" length="30" />
<generator class="assigned" />
</id>
<property name="rowid" type="integer">
<column name="ROWID" not-null="true" />
</property>
<property name="bolId" type="string">
<column name="BOL_ID" length="20" />
</property>
<set name="shipperLinks" inverse="true">
<key>
<column name="TARE_ID" length="30" />
</key>
<one-to-many class="com.nomogen.hibernate.ssve638.ShipperLink" />
</set>
</class>
</hibernate-mapping>
***************************************
Genrated Tare.java
****************************************
package com.nomogen.hibernate.ssve638;
import java.util.Set;
/**
* Tare generated by hbm2java
*/
public class Tare implements java.io.Serializable {
// Fields
private String id;
private Bol bol;
private Integer rowid;
private Set shipperLinks;
private Set pallets;
// Constructors
/** default constructor */
public Tare() {
}
/** constructor with id */
public Tare(String id) {
this.id = id;
}
// Property accessors
public String getId() {
return this.id;
}
public void setId(String id) {
this.id = id;
}
public Bol getBol() {
return this.bol;
}
public void setBol(Bol bol) {
this.bol = bol;
}
public Integer getRowid() {
return this.rowid;
}
public void setRowid(Integer rowid) {
this.rowid = rowid;
}
public Set getShipperLinks() {
return this.shipperLinks;
}
public void setShipperLinks(Set shipperLinks) {
this.shipperLinks = shipperLinks;
}
public Set getPallets() {
return this.pallets;
}
public void setPallets(Set pallets) {
this.pallets = pallets;
}
}
*************************************
As you can see property bolId (column BOL_ID) has no corresponding getter/setter in the generated .java.
I should say that I have not (yet) tried to reproduce the problem using a database containing just one table.... My db has just under 700 tables.
...
Reverse engineering with all options checked failed when the java heap hit about 350Mb - I have yet to try with a larger initial heap.
db