Post

Query Error

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
org.springframework.dao.InvalidDataAccessResourceUsageException: JDBC exception executing SQL [select p1_0.id,p1_0.allowed_date,p1_0.caption,p1_0.created_date,p1_0.last_modified_date,p1_0.owner_id,p1_0.post_image,p1_0.post_status,p1_0.status from post p1_0 join tag t1_0 on t1_0.post_id=p1_0.id and t1_0.member_id=? and (p1_0.status=? and p1_0.post_status=?) left join block b1_0 on (b1_0.blocker_id=t1_0.member_id or b1_0.blocker_id=p1_0.owner_id) and b1_0.blocked_id=? or b1_0.blocker_id=? and (b1_0.blocked_id=t1_0.member_id or b1_0.blocked_id=p1_0.owner_id) group by p1_0.id having count(b1_0.id)=? order by t1_0.last_modified_date desc limit ?,?] [Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'pochak_db.t1_0.last_modified_date' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by] [n/a]; SQL [n/a]
	at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:277)
	at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:241)
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:550)
	at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61)
	at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:335)
	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:152)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:765)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:717)
	at com.apps.pochak.post.domain.repository.PostCustomRepository$$SpringCGLIB$$0.findTaggedPostPage(<generated>)
	at com.apps.pochak.member.service.MemberService.getProfileDetail(MemberService.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
1
[Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'pochak_db.t1_0.last_modified_date' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by]
This post is licensed under CC BY 4.0 by the author.