Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1685

Working with a database that has dots "." in column names- "Quote SQL identifiers" does not seem to help.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • 3.0.1
    • Undefined future
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ericdcobb Eric Cobb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: