#786195 : test for embeddable usage

This commit is contained in:
Timo Westkämper 2011-07-04 13:05:11 +00:00
parent 238aab281d
commit f89f7b59f1
2 changed files with 61 additions and 1 deletions

View File

@ -123,9 +123,16 @@ public class Processor {
processAnnotations();
// remove entity types from extensionTypes
for (String key : entityTypes.keySet()){
for (String key : entityTypes.keySet()) {
extensionTypes.remove(key);
}
// remove super types from others
for (String key : actualSupertypes.keySet()) {
entityTypes.remove(key);
extensionTypes.remove(key);
embeddables.remove(key);
}
serializeTypes();

View File

@ -0,0 +1,53 @@
package com.mysema.query.domain;
import java.io.Serializable;
import javax.persistence.Embeddable;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.MappedSuperclass;
import org.junit.Ignore;
@Ignore
@SuppressWarnings("serial")
public class EmbeddableDeepTest {
public enum SomeType {
a, b;
}
@MappedSuperclass
public abstract class AValueObject implements Cloneable, Serializable {
}
@MappedSuperclass
public abstract class AEntity extends AValueObject {
}
@Entity
public class A extends AEntity {
@Embedded
B b;
}
@Embeddable
public class B extends AValueObject {
@Embedded
C c;
}
@Embeddable
public class C extends AValueObject {
SomeType someType;
}
}