mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-27 21:01:15 +08:00
added test for transient properties
This commit is contained in:
parent
a71f81b1a0
commit
d3b0e141c5
@ -0,0 +1,37 @@
|
||||
package com.mysema.query.domain;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Transient;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.mysema.query.annotations.PropertyType;
|
||||
import com.mysema.query.annotations.QueryType;
|
||||
|
||||
public class TransientTest {
|
||||
|
||||
@Entity
|
||||
class ExampleEntity {
|
||||
|
||||
@QueryType(PropertyType.SIMPLE)
|
||||
@Transient
|
||||
String property1;
|
||||
|
||||
@Transient
|
||||
String property2;
|
||||
|
||||
@QueryType(PropertyType.SIMPLE)
|
||||
transient String property3;
|
||||
|
||||
transient String property4;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test(){
|
||||
assertNotNull(QTransientTest_ExampleEntity.exampleEntity.property1);
|
||||
assertNotNull(QTransientTest_ExampleEntity.exampleEntity.property3);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user