This commit is contained in:
Timo Westkämper 2016-01-11 18:41:31 +02:00
parent 175b2668ba
commit 245be9328c

View File

@ -0,0 +1,49 @@
package com.querydsl.apt.domain;
import org.junit.Test;
import javax.persistence.*;
import static org.junit.Assert.assertNotNull;
public class InitTest {
@Entity
public static class User {
@ManyToOne(fetch = FetchType.EAGER)
private Address address;
}
@Entity
public static class Address extends AddressBase {
}
@MappedSuperclass
public abstract static class AddressBase {
@Id
private long idAddress;
@Id
private int numVersion;
@ManyToOne
private City city;
}
@Entity
public static class City {
}
@Test
public void test() {
assertNotNull(QInitTest_User.user.address.city);
}
}