我的配置是
eclipse3.1+Myeclipse 4.1+sqlserver2000
eclipse3.1+Myeclipse 4.1+sqlserver2000
解决方案 »
- java.lang.NullPointerException
- 求ExtJS方面的文档、书籍
- 急:java调用asmx实例--显示未将对象引用设置到对象实例?
- [300分]为什么在hql中使用select new Orderinfo(A.orderid,A.ordername,1) ...."为什么在构造函使用固定值时报没有匹配参数的构造函
- 又是一个乱码问题
- SSH整合
- 谁有helloworld的ejb例子吗?
- 请问j2ee是什么?
- 求hibernate api文档,在线的不方便啊?
- JSP调用EJB出错
- 关于修改Log4j配置文件后使之打印日志信息及时生效的问题?急急急急急急急急急急急急急急急急急急急急急????????
- 如何启动 J2EE 服务器
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse - Hibernate Tools
-->
<hibernate-mapping>
<class name="tmh.database.Dvbm" table="DVBM" schema="dbo" catalog="tmh">
<id name="dvid" type="long">
<column name="DVID" />
<generator class="identity" />
</id>
<many-to-one name="dwshx" class="tmh.database.Dwshx" fetch="select">
<column name="SHXID" />
</many-to-one>
<property name="name" type="string">
<column name="NAME" length="20" not-null="true" />
</property>
<property name="address" type="string">
<column name="ADDRESS" length="40" />
</property>
<property name="fr" type="string">
<column name="FR" length="20" />
</property>
<property name="call" type="string">
<column name="CALL" length="20" />
</property>
<property name="telphome" type="string">
<column name="TELPHOME" length="30" />
</property>
<property name="fox" type="string">
<column name="FOX" length="20" />
</property>
<set name="yhjbxxes" inverse="true">
<key>
<column name="DVID" />
</key>
<one-to-many class="tmh.database.Yhjbxx" />
</set>
<set name="pds" inverse="true">
<key>
<column name="DVID" />
</key>
<one-to-many class="tmh.database.Pd" />
</set>
<set name="ggjbxxes" inverse="true">
<key>
<column name="DVID" />
</key>
<one-to-many class="tmh.database.Ggjbxx" />
</set>
</class>
</hibernate-mapping>
===================================================================
package tmh.database;import java.util.HashSet;
import java.util.Set;
/**
* AbstractDvbm generated by MyEclipse - Hibernate Tools
*/public abstract class AbstractDvbm implements java.io.Serializable {
// Fields private long dvid;
private Dwshx dwshx;
private String name;
private String address;
private String fr;
private String call;
private String telphome;
private String fox;
private Set yhjbxxes = new HashSet(0);
private Set pds = new HashSet(0);
private Set ggjbxxes = new HashSet(0);
// Constructors /** default constructor */
public AbstractDvbm() {
} /** minimal constructor */
public AbstractDvbm(String name) {
this.name = name;
}
/** full constructor */
public AbstractDvbm(Dwshx dwshx, String name, String address, String fr, String call, String telphome, String fox, Set yhjbxxes, Set pds, Set ggjbxxes) {
this.dwshx = dwshx;
this.name = name;
this.address = address;
this.fr = fr;
this.call = call;
this.telphome = telphome;
this.fox = fox;
this.yhjbxxes = yhjbxxes;
this.pds = pds;
this.ggjbxxes = ggjbxxes;
}
// Property accessors public long getDvid() {
return this.dvid;
}
public void setDvid(long dvid) {
this.dvid = dvid;
} public Dwshx getDwshx() {
return this.dwshx;
}
public void setDwshx(Dwshx dwshx) {
this.dwshx = dwshx;
} public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
} public String getAddress() {
return this.address;
}
public void setAddress(String address) {
this.address = address;
} public String getFr() {
return this.fr;
}
public void setFr(String fr) {
this.fr = fr;
} public String getCall() {
return this.call;
}
public void setCall(String call) {
this.call = call;
} public String getTelphome() {
return this.telphome;
}
public void setTelphome(String telphome) {
this.telphome = telphome;
} public String getFox() {
return this.fox;
}
public void setFox(String fox) {
this.fox = fox;
} public Set getYhjbxxes() {
return this.yhjbxxes;
}
public void setYhjbxxes(Set yhjbxxes) {
this.yhjbxxes = yhjbxxes;
} public Set getPds() {
return this.pds;
}
public void setPds(Set pds) {
this.pds = pds;
} public Set getGgjbxxes() {
return this.ggjbxxes;
}
public void setGgjbxxes(Set ggjbxxes) {
this.ggjbxxes = ggjbxxes;
}
}
<key>
<column name="DVID" />
</key>
<one-to-many class="tmh.database.Yhjbxx" />
</set>
<set name="pds" inverse="true">
<key>
<column name="DVID" />
</key>
<one-to-many class="tmh.database.Pd" />
</set>
<set name="ggjbxxes" inverse="true">
<key>
<column name="DVID" />
</key>
<one-to-many class="tmh.database.Ggjbxx" />
</set>你的这几个set 都对应到DVID一个字段你的逻辑是什么