mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-13 21:01:01 +08:00
48 lines
968 B
Java
48 lines
968 B
Java
package com.mysema.query.domain;
|
|
|
|
import static org.junit.Assert.assertNotNull;
|
|
|
|
import org.junit.Test;
|
|
|
|
import com.mysema.query.annotations.QueryEntity;
|
|
import com.mysema.query.annotations.QueryInit;
|
|
|
|
public class QueryInit2Test {
|
|
|
|
@QueryEntity
|
|
public static class Categorization{
|
|
|
|
@QueryInit("account.owner")
|
|
Event event;
|
|
}
|
|
|
|
@QueryEntity
|
|
public static class Event{
|
|
|
|
Account account;
|
|
}
|
|
|
|
@QueryEntity
|
|
public static class Withdrawal extends Event{
|
|
|
|
}
|
|
|
|
@QueryEntity
|
|
public static class Account{
|
|
|
|
Owner owner;
|
|
}
|
|
|
|
@QueryEntity
|
|
public static class Owner{
|
|
|
|
}
|
|
|
|
@Test
|
|
public void test(){
|
|
assertNotNull(QCategorization.categorization.event.account.owner);
|
|
assertNotNull(QCategorization.categorization.event.as(QWithdrawal.class).account.owner);
|
|
}
|
|
|
|
}
|