mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Fix for #173 - Ability to use a MappedSuperClass without being enhanced as long as it doesn't have persistent fields
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package com.avaje.tests.model.mappedsuper;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
|
||||
@Entity
|
||||
public class ASimpleBean extends NotEnhancedMappedSuper {
|
||||
|
||||
@Id
|
||||
Long id;
|
||||
|
||||
String name;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.avaje.tests.model.mappedsuper;
|
||||
|
||||
import javax.persistence.MappedSuperclass;
|
||||
import javax.persistence.Transient;
|
||||
|
||||
@MappedSuperclass
|
||||
public abstract class NotEnhancedMappedSuper {
|
||||
|
||||
public static String SOMETHING = "Hello";
|
||||
|
||||
private transient Long one;
|
||||
|
||||
@Transient
|
||||
private Long two;
|
||||
|
||||
public Long getOne() {
|
||||
return one;
|
||||
}
|
||||
|
||||
public void setOne(Long one) {
|
||||
this.one = one;
|
||||
}
|
||||
|
||||
public Long getTwo() {
|
||||
return two;
|
||||
}
|
||||
|
||||
public void setTwo(Long two) {
|
||||
this.two = two;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user