ssh hibernate建表一共建了4张表 生成了3张一张没有生成??
四张表分别为client、admin、goods、orderform.client、admin、orderform都生成了就是Goods没有生成文件如下:@Entity@...
四张表分别为 client、admin、goods、orderform. client、admin、orderform都生成了就是Goods没有生成
文件如下:
@Entity
@Table(name="goods")
public class Goods {
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
private int id;
private String name;
private String material;
private String place_of_production;
private double price;
private String unit;
private int number;
private String type;
private String theFile;
@ManyToMany(cascade=CascadeType.ALL)
@JoinTable(name="orderform_goods")
private List<OrderForm> orderform = new ArrayList<OrderForm>();
}
get() set()都写了
<session-factory>
<mapping class="com.web.bean.Admin"/>
<mapping class="com.web.bean.OrderForm"/>
<mapping class="com.web.bean.Goods"/>
<mapping class="com.web.bean.Client"/>
</session-factory>
最好是能留个联系方式!!!!2234338740@qq.com 展开
文件如下:
@Entity
@Table(name="goods")
public class Goods {
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
private int id;
private String name;
private String material;
private String place_of_production;
private double price;
private String unit;
private int number;
private String type;
private String theFile;
@ManyToMany(cascade=CascadeType.ALL)
@JoinTable(name="orderform_goods")
private List<OrderForm> orderform = new ArrayList<OrderForm>();
}
get() set()都写了
<session-factory>
<mapping class="com.web.bean.Admin"/>
<mapping class="com.web.bean.OrderForm"/>
<mapping class="com.web.bean.Goods"/>
<mapping class="com.web.bean.Client"/>
</session-factory>
最好是能留个联系方式!!!!2234338740@qq.com 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询