You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
I'm using infobip-spring-data-jdbc-querydsl-boot-starter 6.2.1 version with querydsl 5.0.0
And when I use @Transient like in the following block:
@Table("entity")
@Data
@Builder
@RequiredArgsConstructor
public class Entity {
@Id
private final Long id;
@Transient
private final boolean isNew;
}
I get exception:
Failed to load ApplicationContext
java.lang.IllegalStateException: Failed to load ApplicationContext
...
Caused by: java.lang.NullPointerException
at com.querydsl.core.types.ConstructorExpression.getParameterTypes(ConstructorExpression.java:59)
at com.querydsl.core.types.ConstructorExpression.<init>(ConstructorExpression.java:74)
at com.querydsl.core.types.Projections.constructor(Projections.java:121)
at com.infobip.spring.data.common.QuerydslExpressionFactory.getConstructorExpression(QuerydslExpressionFactory.java:54)
at com.infobip.spring.data.jdbc.QuerydslJdbcRepositoryFactory.getRepositoryFragments(QuerydslJdbcRepositoryFactory.java:73)
at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepositoryComposition(RepositoryFactorySupport.java:371)
at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:276)
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet$5(RepositoryFactoryBeanSupport.java:323)
at org.springframework.data.util.Lazy.getNullable(Lazy.java:230)
at org.springframework.data.util.Lazy.get(Lazy.java:114)
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:329)
at org.springframework.data.jdbc.repository.support.JdbcRepositoryFactoryBean.afterPropertiesSet(JdbcRepositoryFactoryBean.java:201)
at com.infobip.spring.data.jdbc.QuerydslJdbcRepositoryFactoryBean.afterPropertiesSet(QuerydslJdbcRepositoryFactoryBean.java:161)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1845)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782)
... 162 more
Hello,
if I remember correctly, a constructor without @Transient field is required and it should be marked with @PersistenceConstructor.
For details check out related test classes.
Hi!
I'm using infobip-spring-data-jdbc-querydsl-boot-starter 6.2.1 version with querydsl 5.0.0
And when I use
@Transient
like in the following block:I get exception:
Looks like #18 problem.
The text was updated successfully, but these errors were encountered: