I have an @Entity class that I use querydsl code generation on.

Problem: my entity has a parent entity which contains some @Transient fields. And those are not skipped during generation.

package com.domain.myentity

public class MyEntity extends AuditingEntity {


package com.auditing

public class AuditingEntity {
    private transient Object obj;


@QueryEntities(value = MyEntity.class)
package com.domain.myentity

import com.querydsl.core.annotations.QueryEntities;
import com.domain.myentity.MyEntity;

Question: how can I tell querydsl to ignore any @Transient fields automatically? Currently the root cause is probably that the AuditingEntity is in a different folder than the domain entity, and therefore not listed in the package-info.java of querydsl. But how could I solve it without having to move the auditing entity?

Generated during:


1 Answers

Erçin Akçay On

Could you try transient declaration as transient String obj; instead of

private Object obj;