Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with HibernateDomainExporter and bidirectional one-to-many associations #234

mirkosertic opened this issue Sep 20, 2012 · 1 comment


Copy link

@mirkosertic mirkosertic commented Sep 20, 2012

There is a problem with Hibernate bidirectional references:

Caused by: java.lang.IllegalArgumentException: No property found for ch.bedag.gba.capitastra.model.beschreibung.GbPlan._ch.bedag.gba.capitastra.model.beschreibung.GbPlanMaster.versionsBackref
at com.mysema.query.jpa.codegen.HibernateDomainExporter.getType(
at com.mysema.query.jpa.codegen.HibernateDomainExporter.handleProperty(
at com.mysema.query.jpa.codegen.HibernateDomainExporter.collectTypes(
at com.mysema.query.jpa.codegen.HibernateDomainExporter.execute(
at ch.bedag.gba.maven.plugin.querydsl.HibernateExportMojo.execute(

The exporter should check org.hibernate.mapping.Property.isBackRef() for every discovered property. If it is a backref, it must be ignored.

Iterator<?> properties = pc.getDeclaredPropertyIterator();
while (properties.hasNext()) {
    org.hibernate.mapping.Property theProperty = (org.hibernate.mapping.Property);
    if (!theProperty.isBackRef()) {
        handleProperty(entityType, pc.getMappedClass(), theProperty);
Copy link

@timowest timowest commented Sep 29, 2012

Released in 2.8.0

@timowest timowest closed this Sep 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants