i have this simple entity
@Entity(name = "person")
@NodeEntity(partial = true)
public class Person {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id")
private Long id;
@Transient
@GraphProperty
private String sureName;
@QueryTransient
@Column(name = "surename")
private String firstName;
}
now i try to create with the querydsl apt-maven-plugin to generate the Q* classes.
in my pom.xml i have this configuration:
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>target/generated-sources/java</outputDirectory>
<processors>
<processor>org.springframework.data.neo4j.querydsl.SDNAnnotationProcessor</processor>
<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
</processors>
</configuration>
</execution>
</executions>
</plugin>
the problem now is that the last processor overwrite the first generated class with the new one. The idea was to have separate Q* clases for neo4j and for JPA because of the transient fields.
The results with only one processor:
SDNAnnotationProcessor
/**
* QPerson is a Querydsl query type for Person
*/
@Generated("com.mysema.query.codegen.EntitySerializer")
public class QPerson extends EntityPathBase<Person> {
private static final long serialVersionUID = 1610526870L;
public static final QPerson person = new QPerson("person");
public final NumberPath<Long> id = createNumber("id", Long.class);
public final StringPath sureName = createString("sureName");
public QPerson(String variable) {
super(Person.class, forVariable(variable));
}
public QPerson(Path<? extends Person> path) {
super(path.getType(), path.getMetadata());
}
public QPerson(PathMetadata<?> metadata) {
super(Person.class, metadata);
}
}
JPAAnnotationProcessor
/**
* QPerson is a Querydsl query type for Person
*/
@Generated("com.mysema.query.codegen.EntitySerializer")
public class QPerson extends EntityPathBase<Person> {
private static final long serialVersionUID = 1610526870L;
public static final QPerson person = new QPerson("person");
public final StringPath firstName = createString("firstName");
public final NumberPath<Long> id = createNumber("id", Long.class);
public QPerson(String variable) {
super(Person.class, forVariable(variable));
}
public QPerson(Path<? extends Person> path) {
super(path.getType(), path.getMetadata());
}
public QPerson(PathMetadata<?> metadata) {
super(Person.class, metadata);
}
}
does anybody know how to separate these generated classes?