Beginner |
 |
Joined: Fri May 12, 2006 9:58 am Posts: 32
|
Hibernate version:
3.1.3
Mapping documents:
... table="test-bikes" ...
Full stack trace of any exception that occurs:
Incorrect syntax near '-'.
Name and version of the database you are using:
SQL Server 2000
The generated SQL (show_sql=true):
......
from test-bikes bikes0_ where bikes0_.uid=?
I'm using the org.hibernate.dialect.SQLServerDialect dialect and I have a table called test-bikes. Saying "...from test-bikes..." in SQL Server produces an error (because of the dash symbol). In order for this table name to be valid it needs "...from [test-bikes]".
Is this a bug?
I'm not sure if my question is valid, but shouldn't that be supported in the dialect?
A temp solution might be to change all my mappings to table="[test-bikes]".
Another solution is to change the table name to something like test_bike (which I've already done).
thanks
|
|