mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-16 21:01:10 +08:00
#247 furhter code generation improvements
This commit is contained in:
parent
9e1f7e7f3a
commit
74f4ff0007
@ -0,0 +1,8 @@
|
||||
package com.mysema.query.domain;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
|
||||
@Entity
|
||||
public class Expression {
|
||||
|
||||
}
|
||||
@ -59,6 +59,7 @@ import com.mysema.query.types.Path;
|
||||
import com.mysema.query.types.PathMetadata;
|
||||
import com.mysema.query.types.PathMetadataFactory;
|
||||
import com.mysema.query.types.expr.ComparableExpression;
|
||||
import com.mysema.query.types.expr.SimpleExpression;
|
||||
import com.mysema.query.types.path.ArrayPath;
|
||||
import com.mysema.query.types.path.BooleanPath;
|
||||
import com.mysema.query.types.path.CollectionPath;
|
||||
@ -429,8 +430,8 @@ public class EntitySerializer implements Serializer{
|
||||
// other packages
|
||||
List<Package> packages = Lists.newArrayList();
|
||||
packages.add(SimplePath.class.getPackage());
|
||||
if (!model.getConstructors().isEmpty()) {
|
||||
packages.add(ConstructorExpression.class.getPackage());
|
||||
if (!model.getConstructors().isEmpty()) {
|
||||
packages.add(SimpleExpression.class.getPackage());
|
||||
}
|
||||
if (isImportExprPackage(model)) {
|
||||
packages.add(ComparableExpression.class.getPackage());
|
||||
@ -442,6 +443,10 @@ public class EntitySerializer implements Serializer{
|
||||
if (!model.getSimpleName().equals("Path")) {
|
||||
classes.add(Path.class);
|
||||
}
|
||||
if (!model.getConstructors().isEmpty()) {
|
||||
classes.add(ConstructorExpression.class);
|
||||
classes.add(Expression.class);
|
||||
}
|
||||
boolean inits = false;
|
||||
if (model.hasEntityFields() || model.hasInits()) {
|
||||
inits = true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user