mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-30 21:08:30 +08:00
#786195 : test for embeddable usage
This commit is contained in:
parent
238aab281d
commit
f89f7b59f1
@ -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();
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user