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

@QueryProjection does not work on @Embeddable classes #909

yrodiere opened this issue Aug 25, 2014 · 2 comments

@QueryProjection does not work on @Embeddable classes #909

yrodiere opened this issue Aug 25, 2014 · 2 comments


Copy link

@yrodiere yrodiere commented Aug 25, 2014

This code won't have the corresponding projection constructor generated :

public class EmbeddableTest {

    private Integer embeddedProperty;

    public EmbeddableTest() { }

    public EmbeddableTest(Integer embeddedProperty) {
        this.embeddedProperty = embeddedProperty;

    public Integer getEmbeddedProperty() {
        return embeddedProperty;

    public void setEmbeddedProperty(Integer embeddedProperty) {
        this.embeddedProperty = embeddedProperty;


Here is the generated code :

import static com.mysema.query.types.PathMetadataFactory.*;

import com.mysema.query.types.path.*;
import com.mysema.query.types.expr.*;

import com.mysema.query.types.PathMetadata;
import javax.annotation.Generated;
import com.mysema.query.types.Path;
import com.mysema.query.types.ConstructorExpression;
import com.mysema.query.types.Expression;

 * QEmbeddableTest is a Querydsl query type for EmbeddableTest
public class QEmbeddableTest extends BeanPath<EmbeddableTest> {

    private static final long serialVersionUID = -886461401L;

    public static final QEmbeddableTest embeddableTest = new QEmbeddableTest("embeddableTest");

    public final NumberPath<Integer> embeddedProperty = createNumber("embeddedProperty", Integer.class);

    public QEmbeddableTest(String variable) {
        super(EmbeddableTest.class, forVariable(variable));

    public QEmbeddableTest(Path<? extends EmbeddableTest> path) {
        super(path.getType(), path.getMetadata());

    public QEmbeddableTest(PathMetadata<?> metadata) {
        super(EmbeddableTest.class, metadata);


I thing this may be related to the EmbeddableSerializer, since I haven't encountered this issue on non-@Embeddable classes.

Copy link

@timowest timowest commented Aug 26, 2014

Thanks for the bug report. I added now a pull request.

@timowest timowest added the bug label Aug 26, 2014
@timowest timowest added this to the 3.4.3 milestone Aug 27, 2014
Copy link

@timowest timowest commented Aug 31, 2014

Released in 3.4.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.