Q-Type for @Embeddable in foreigen package is not created

Bug #783546 reported by Michael Glauche on 2011-05-16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fix Released
Timo Westkämper

Bug Description

   i'm having a problem with APT and entites in different packages. We use a "base" entity which has an @Embedded Field for statistical data. That class is also annotated with @Embeddable and working fine in plain JPA.

Now, when i run maven-apt-plugin on the current project the "base" entity is found and has a matching Q-Class, but it gives an compile error because the Q-Class for the @Embeddable class is missing.

If i copy the source of that @Embeddable class into my current project everything is fine.

Do i need to put the apt-plugin also in the referenced package with the "base" entity ? Or is it possible that the querydsl processor will create all neccessary metatdata ? (Which would be prefered, because sometimes the entity you are refering to is out of your scope)

Tags: apt Edit Tag help
tags: added: apt
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

It is difficult to support both modes. I will see if it is possible to enable this easily via an APT option.

Vesa Marttila (ponzao) on 2011-05-23
Changed in querydsl:
status: New → In Progress
assignee: nobody → Timo Westkämper (timo-westkamper)
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Are you still having the issue? I was not able to reproduce it with 2.2.0.beta5

Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Ok, it worked with the Querydsl annotations, but not with the JPA annotations.

I made a fix which only requires that you annotate usage of external embeddables with @Embedded on the property.

Could you verify the fix with SVN trunk?

Changed in querydsl:
status: In Progress → Fix Committed
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

Released in 2.2.0

Changed in querydsl:
status: Fix Committed → Fix Released
Revision history for this message
Werner Willms (w-willms) wrote :


on our project we're currently seeing the same issue, QueryDSL version 3.3.2, apt-maven-plugin version 1.1.1, spring 4.0.3.RELEASE, spring data version 1.5.2.RELEASE. The maven project build is just fine and works like a charm until the Q-Types have to be created during generate sources phase:

symbol: class QProductInfoId
  location: package com....common.uuid
.../trunk/backend/app/target/generated-sources/com/.../backend/app/entities/partners/QPartner.java:32: error: cannot find symbol
    public final com...backend.common.uuid.QPartnerId partnerId;

We've checked against version 2.2.0 which apparently has fixed the issue. Then, we've tried various versions of QueryDSL and found that version 2.2.4 is the one that does not cause the issue. So, maybe the bug was re-introduced in version 2.2.5?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers