how do I generate Q class with the @QueryProjection annotation via GenericExporter. #480

Closed
wdaogang opened this Issue Aug 22, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@wdaogang

I'm using querydsl 3.2.2 and jdk6 in spring roo .

I can export the Q file from the file with the @entity but I can't export QProductDTO.java via the ProductDTO which annotated @QueryProjection.

GenericExporter exporter = new GenericExporter();
exporter.setKeywords(Keywords.JPA);
exporter.setEntityAnnotation(Entity.class);
exporter.setEmbeddableAnnotation(Embeddable.class);
exporter.setEmbeddedAnnotation(Embedded.class);
exporter.setSupertypeAnnotation(MappedSuperclass.class);
exporter.setSkipAnnotation(Transient.class);
exporter.setTargetFolder(new File("target/generated-sources/java"));
exporter.export(Product.class.getPackage(),ProductDTO.class.getPackage());

below is the ProductDTO code:

public class ProductDTO {
private Product product;

@QueryProjection
public ProductDTO(Product product) {
    this.product = product;
}

public Product getProduct() {
    return product;
}

public void setProduct(Product product) {
    this.product = product;
}

}

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Oct 20, 2013

Member

Released in 3.2.4

Member

timowest commented Oct 20, 2013

Released in 3.2.4

@timowest timowest closed this Oct 20, 2013

@timowest timowest added this to the 3.2.4 milestone Apr 13, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment