Details
-
Bug
-
Status: Reopened
-
Major
-
Resolution: Unresolved
-
3.0.1
-
None
-
None
-
apache cayenne 3.0.0.1, tomcat 6.x
Description
Unfortunately I have no control over the column names, I am trying to integrate my project with a database that my client already uses/maintains.
One of their tables uses dots (".") in column names. For example:
<db-attribute name="Division.t" type="VARCHAR"/>
Cayenne reports that it can not resolve that path component:
Caused by: org.apache.cayenne.exp.ExpressionException: [v.3.0.1.LB Oct 24 2011 22:29:11] Can't resolve path component: [FILE_NAME.Division'].
at org.apache.cayenne.map.Entity$PathIterator.next(Entity.java:439)
at org.apache.cayenne.map.Entity$PathIterator.next(Entity.java:388)
at org.apache.cayenne.map.ObjAttribute.getDbAttribute(ObjAttribute.java:170)
at com.routeto1.data.impl.DynamicDataObjectClassFactory.getDataObjectClass(DynamicDataObjectClassFactory.java:128)
at com.routeto1.data.impl.DynamicDataObjectClassFactory.getDataObjectClasses(DynamicDataObjectClassFactory.java:91)
at com.routeto1.data.meta.persist.MetaModelDAO.afterPropertiesSet(MetaModelDAO.java:149)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 51 more
I lose everything after the "." .Turning on "quote sql identifiers" does not seem to help. Any workarounds and/or fixes would be appreciated.