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:
rbygrave
2014-07-19 17:49:03 +12:00
parent 2dca1bdf5b
commit 0c4fc4eea3
11 changed files with 165 additions and 61 deletions
@@ -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;
}
}