Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365872 - Not properly DDL generating
Summary: Not properly DDL generating
Status: CLOSED INVALID
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-07 07:23 EST by shenzl CLA
Modified: 2022-06-09 10:32 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description shenzl CLA 2011-12-07 07:23:55 EST
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  )
Comment 1 Tom Ware CLA 2011-12-14 16:10:02 EST
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.
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:32:26 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink