fix enumeration mapping

This commit is contained in:
Peter Hormanns 2017-08-03 17:05:10 +02:00
parent ae2e353ed8
commit 61e5634160
2 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,8 @@ import java.util.Date;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType; import javax.persistence.GenerationType;
import javax.persistence.Id; import javax.persistence.Id;
@ -36,6 +38,7 @@ public class MemberAsset implements Serializable {
private Date date; private Date date;
@Column(name="action", nullable = false) @Column(name="action", nullable = false)
@Enumerated(EnumType.STRING)
private MemberAssetAction action; private MemberAssetAction action;
@Column(name="amount", nullable = false) @Column(name="amount", nullable = false)

View File

@ -7,6 +7,8 @@ import java.util.Date;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType; import javax.persistence.GenerationType;
import javax.persistence.Id; import javax.persistence.Id;
@ -35,6 +37,7 @@ public class MemberShare implements Serializable {
private Date date; private Date date;
@Column(name="action", nullable = false) @Column(name="action", nullable = false)
@Enumerated(EnumType.STRING)
private MemberShareAction action; private MemberShareAction action;
@Column(name="quantity", nullable = false) @Column(name="quantity", nullable = false)