mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-30 21:08:30 +08:00
improved APT setup
This commit is contained in:
parent
c3d20703ff
commit
dec6565b47
@ -96,6 +96,7 @@
|
||||
<artifactId>maven-apt-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>generate-test-sources</phase>
|
||||
<goals>
|
||||
<goal>test-process</goal>
|
||||
</goals>
|
||||
|
||||
@ -17,6 +17,7 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.google.code.morphia.Datastore;
|
||||
@ -243,9 +244,11 @@ public class MongodbQueryTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void testEmbeddedObjects() {
|
||||
|
||||
//User r = where(user.addresses.any().street.eq("hahahah"))
|
||||
where(user.addresses.any().street.eq("hahahah")).uniqueResult();
|
||||
// TODO
|
||||
|
||||
|
||||
|
||||
|
||||
@ -26,8 +26,8 @@ public class User {
|
||||
|
||||
private Date created;
|
||||
|
||||
// @Embedded
|
||||
// private List<Address> addresses = new ArrayList<Address>();
|
||||
@Embedded
|
||||
private List<Address> addresses = new ArrayList<Address>();
|
||||
|
||||
@Embedded
|
||||
private Address mainAddress;
|
||||
@ -107,14 +107,14 @@ public class User {
|
||||
this.mainAddress = new Address(street, postCode, city);
|
||||
}
|
||||
|
||||
// public User addAddress(String street, String postalCode, City city) {
|
||||
// addresses.add(new Address(street, postalCode, city));
|
||||
// return this;
|
||||
// }
|
||||
//
|
||||
// public List<Address> getAddresses() {
|
||||
// return addresses;
|
||||
// }
|
||||
public User addAddress(String street, String postalCode, City city) {
|
||||
addresses.add(new Address(street, postalCode, city));
|
||||
return this;
|
||||
}
|
||||
|
||||
public List<Address> getAddresses() {
|
||||
return addresses;
|
||||
}
|
||||
|
||||
public User addFriend(User friend) {
|
||||
friends.add(friend);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user