use of com.querydsl.jpa.domain.Location in project querydsl by querydsl.
the class JPQLSerializerTest method fromWithCustomEntityName.
@Test
public void fromWithCustomEntityName() {
JPQLSerializer serializer = new JPQLSerializer(HQLTemplates.DEFAULT);
EntityPath<Location> entityPath = new EntityPathBase<Location>(Location.class, "entity");
QueryMetadata md = new DefaultQueryMetadata();
md.addJoin(JoinType.DEFAULT, entityPath);
serializer.serialize(md, false, null);
assertEquals("select entity\nfrom Location2 entity", serializer.toString());
}
Aggregations