Community
Participate
Working Groups
Build Identifier: elipseLink 2.3.0,elipseLink 2.3.1 org.springframework.web.util.NestedServletException: Request processing failed; nested exception is Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC LIMIT 0, 15' at line 1 Error Code: 1064 Call: SELECT t1.ID AS a1, t1.CODE AS a2, t1.DESCRIPTION AS a3, t1.NAME AS a4, t1.VERSION AS a5, t1.TYPE_ID AS a6 FROM T_DICTIONARY t0, T_DICTIONARY t1 WHERE (t0.ID = t1.TYPE_ID) ORDER BY ASC LIMIT ?, ? bind => [2 parameters bound] Reproducible: Always Steps to Reproduce: 1.create an entity with a property named a word that reserved by database,such as 'name','type' 2.use it to crate an Order clause with CriteriaBuilder( see toJpaOrder in org.springframework.data.jpa.repository.support.SimpleJpaRepository )
EclipseLink will not validate your attribute names against the various reserved words used by databases. The collection of those words for all possible databases is simply too big and to changeable.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink