mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#472 - DDL column ordering for @WhoCreated / @WhoModified. These columns should appear in the DDL with the @WhenCreated/@WhenModified columns.
This commit is contained in:
@@ -1,46 +1,12 @@
|
||||
package com.avaje.tests.model;
|
||||
|
||||
import com.avaje.ebean.annotation.WhenCreated;
|
||||
import com.avaje.ebean.annotation.WhenModified;
|
||||
import com.avaje.ebean.annotation.WhoCreated;
|
||||
import com.avaje.ebean.annotation.WhoModified;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Version;
|
||||
import java.sql.Timestamp;
|
||||
|
||||
@Entity
|
||||
public class EWhoProps {
|
||||
|
||||
@Id
|
||||
Long id;
|
||||
public class EWhoProps extends EWhoPropsSuper {
|
||||
|
||||
String name;
|
||||
|
||||
@Version
|
||||
Long version;
|
||||
|
||||
@WhenCreated
|
||||
Timestamp whenCreated;
|
||||
|
||||
@WhenModified
|
||||
Timestamp whenModified;
|
||||
|
||||
@WhoCreated
|
||||
String whoCreated;
|
||||
|
||||
@WhoModified
|
||||
String whoModified;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
@@ -49,43 +15,4 @@ public class EWhoProps {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Long getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(Long version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Timestamp getWhenCreated() {
|
||||
return whenCreated;
|
||||
}
|
||||
|
||||
public void setWhenCreated(Timestamp whenCreated) {
|
||||
this.whenCreated = whenCreated;
|
||||
}
|
||||
|
||||
public Timestamp getWhenModified() {
|
||||
return whenModified;
|
||||
}
|
||||
|
||||
public void setWhenModified(Timestamp whenModified) {
|
||||
this.whenModified = whenModified;
|
||||
}
|
||||
|
||||
public String getWhoCreated() {
|
||||
return whoCreated;
|
||||
}
|
||||
|
||||
public void setWhoCreated(String whoCreated) {
|
||||
this.whoCreated = whoCreated;
|
||||
}
|
||||
|
||||
public String getWhoModified() {
|
||||
return whoModified;
|
||||
}
|
||||
|
||||
public void setWhoModified(String whoModified) {
|
||||
this.whoModified = whoModified;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.avaje.tests.model;
|
||||
|
||||
import com.avaje.ebean.annotation.WhenCreated;
|
||||
import com.avaje.ebean.annotation.WhenModified;
|
||||
import com.avaje.ebean.annotation.WhoCreated;
|
||||
import com.avaje.ebean.annotation.WhoModified;
|
||||
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.MappedSuperclass;
|
||||
import javax.persistence.Version;
|
||||
import java.sql.Timestamp;
|
||||
|
||||
@MappedSuperclass
|
||||
public class EWhoPropsSuper {
|
||||
|
||||
@Id
|
||||
Long id;
|
||||
|
||||
@Version
|
||||
Long version;
|
||||
|
||||
@WhenCreated
|
||||
Timestamp whenCreated;
|
||||
|
||||
@WhenModified
|
||||
Timestamp whenModified;
|
||||
|
||||
@WhoCreated
|
||||
String whoCreated;
|
||||
|
||||
@WhoModified
|
||||
String whoModified;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(Long version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public Timestamp getWhenCreated() {
|
||||
return whenCreated;
|
||||
}
|
||||
|
||||
public void setWhenCreated(Timestamp whenCreated) {
|
||||
this.whenCreated = whenCreated;
|
||||
}
|
||||
|
||||
public Timestamp getWhenModified() {
|
||||
return whenModified;
|
||||
}
|
||||
|
||||
public void setWhenModified(Timestamp whenModified) {
|
||||
this.whenModified = whenModified;
|
||||
}
|
||||
|
||||
public String getWhoCreated() {
|
||||
return whoCreated;
|
||||
}
|
||||
|
||||
public void setWhoCreated(String whoCreated) {
|
||||
this.whoCreated = whoCreated;
|
||||
}
|
||||
|
||||
public String getWhoModified() {
|
||||
return whoModified;
|
||||
}
|
||||
|
||||
public void setWhoModified(String whoModified) {
|
||||
this.whoModified = whoModified;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user