【发布时间】:2014-05-12 03:09:50
【问题描述】:
你好,我是 php 的 web 开发人员,最近迁移到 javaEE。我在 mysql 中创建表。 这是头等舱:
@Entity
@Table(name = "first")
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE, inclu`enter code here`de = "all")
public class first extends second {
@OneToOne(cascade = CascadeType.ALL)
private second A;
。 . . 这是我的第二节课:
@Entity
@Table(name = "second", uniqueConstraints =
@UniqueConstraint(columnNames = {"feildone", "feildtwo"}))
public class second implements Serializable {
@OneToOne(cascade = CascadeType.ALL, mappedBy = "first")
public static final String FindOne = "findOne";
@Id
@GeneratedValue
Integer id;
private String feildtwo;
private String feildone;
@Temporal(javax.persistence.TemporalType.DATE)
private Date createTime;
@OneToMany(cascade = CascadeType.ALL)
public List<Progress> progress = new ArrayList<>();
private Integer num;
。 . .
【问题讨论】:
-
你现在有什么问题???
-
@user3484593 告诉我们您的问题到底是什么......或者看看我的解决方案是否适合你......
标签: java mysql hibernate flush