Announcement Announcement Module
Collapse
No announcement yet.
Casing in JdbcDaoImpl query string caused a small bug? Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Casing in JdbcDaoImpl query string caused a small bug?

    Hi all,

    I was trying to convert the contacts sample application to use mysql on my powerbook, but it was throwning an error. The error was along the lines of "unable to find table 'parent' in SQL." I searched out the sql it dumped, which lead me to the JdbcDaoImpl object. It seems I had to change line 63 of net.sf.acegisecurity.acl.basic.jdbc.JdbcDaoImpl

    from:

    public static final String DEF_OBJECT_PROPERTIES_QUERY = "SELECT CHILD.ID, CHILD.OBJECT_IDENTITY, CHILD.ACL_CLASS, PARENT.OBJECT_IDENTITY as PARENT_OBJECT_IDENTITY FROM acl_object_identity as CHILD LEFT OUTER JOIN acl_object_identity as PARENT ON CHILD.parent_object=parent.id WHERE CHILD.object_identity = ?";

    to:

    public static final String DEF_OBJECT_PROPERTIES_QUERY = "SELECT CHILD.ID, CHILD.OBJECT_IDENTITY, CHILD.ACL_CLASS, PARENT.OBJECT_IDENTITY as PARENT_OBJECT_IDENTITY FROM acl_object_identity as CHILD LEFT OUTER JOIN acl_object_identity as PARENT ON CHILD.parent_object=PARENT.id WHERE CHILD.object_identity = ?";

    and now things seem to work fine. Let me know if I should post this somewhere else please.

    /david

  • #2
    I just committed the change to CVS. For the benefit of the archives, which RDBMS were you using?

    Comment


    • #3
      oops, i forgot the important stuff...

      Here's my system info:
      • 4.0.21 Complete MySQL
        mysql-connector-java-3.1.6
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3)
        Tomcat 4.1.29

      Comment

      Working...
      X