Hi Timo,
1. I cloned the latest querydsl from github as I can see your fixes (issue 664 and 665) from history, I built and installed querydsl 3.3.2.BUILD-SNAPSHOT to my local maven repository.
2. My sample project "querydsl-hbm-usertype-example" actually is a Maven Multi-Module Project, which has:
-- querydsl-hbm-plugin: a simple maven plugin calling HibernateDomainExporter to generate Querydsl class(es):
====================================================================================
HibernateDomainExporter theExporter = new HibernateDomainExporter(prefix, targetFolder, theConfiguration);
theExporter.setUnknownAsEntity(false);
theExporter.execute();
====================================================================================
-- hibernate-entities: a simple Hibernate Entity "Subscriber" mapped postgres db table "subscriber" through "Subscriber.hbm.xml"
====================================================================================
public class Subscriber {
@QueryType(PropertyType.SIMPLE)
private FacebookId facebookId;
private InternalAttr internalAttr;
}
====================================================================================
-- querydsl-codegen: using querydsl-hbm-plugin to generate "QSubscriber" with a simple UserTypeTest
====================================================================================
querydsl-codegent/target/generate-sources/.../QSubscriber.java:
/**
* QSubscriber is a Querydsl query type for Subscriber
*/
@Generated("com.mysema.query.codegen.EntitySerializer")
public class QSubscriber extends EntityPathBase<Subscriber> {
private static final long serialVersionUID = -2054050710L;
public static final QSubscriber subscriber = new QSubscriber("subscriber");
public final NumberPath<Integer> age = createNumber("age", Integer.class);
public final SimplePath<com.querydslexample.hibernate.usertype.FacebookId> facebookId = createSimple("facebookId", com.querydslexample.hibernate.usertype.FacebookId.class);
public final NumberPath<Long> id = createNumber("id", Long.class);
public final SimplePath<com.querydslexample.hibernate.usertype.InternalAttr> internalAttr = createSimple("internalAttr", com.querydslexample.hibernate.usertype.InternalAttr.class);
public final StringPath name = createString("name");
public QSubscriber(String variable) {
super(Subscriber.class, forVariable(variable));
}
public QSubscriber(Path<? extends Subscriber> path) {
super(path.getType(), path.getMetadata());
}
public QSubscriber(PathMetadata<?> metadata) {
super(Subscriber.class, metadata);
}
}
====================================================================================
You need create a local postgresql db "querydslexample" and run "postgres_subscriber_table.sql" either using psql or pgAdmin to create "subscriber" table.
Thanks in advance!
Jian