EclipseLink & Cell Names with White Space [message #654471] |
Tue, 15 February 2011 17:38  |
Eclipse User |
|
|
|
Performing a normal query like
List<Contact> list = em.createNamedQuery("Contact.findAll").getResultList();
gets translated into
SELECT No_, Mitgl_ in Firmenmitgliedschaft, Telex Answer Back, Profession, [...]
which results in an java.sql.SQLException because of wrong syntax. Is there any way to deal with columns containing white spaces?
I got to use MS SQL here, so the normal way of doing such a query would be
SELECT No_, [Mitgl_ in Firmenmitgliedschaft], [Telex Answer Back], Profession, [...]
I set NATIVE_SQL and SQL Server in the persistence.xml, but it did not help for this issue...
|
|
|
|
Re: EclipseLink & Cell Names with White Space [message #654910 is a reply to message #654471] |
Thu, 17 February 2011 10:16  |
Eclipse User |
|
|
|
In JPA2 there is an element in the orm.xml persistence meta-data,
<delimited-identifiers>
that will have all columns delimited to allow spaces/special chars/case.
I think using,
@Column(name = "\"Mitgl_ in Firmenmitgliedschaft\"")
will also work.
|
|
|
Powered by
FUDForum. Page generated in 0.07161 seconds