Results 1 to 3 of 3

Thread: Casing in JdbcDaoImpl query string caused a small bug?

  1. #1
    Join Date
    Feb 2005
    Location
    Lahaina, HI
    Posts
    8

    Default 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
    \"In the past, I was the future.\"
    - Tes

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

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

  3. #3
    Join Date
    Feb 2005
    Location
    Lahaina, HI
    Posts
    8

    Default 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
    \"In the past, I was the future.\"
    - Tes

Similar Threads

  1. ERROR: Context initialization failed
    By makhlo in forum Architecture
    Replies: 8
    Last Post: Jul 11th, 2008, 01:41 AM
  2. hibernate pagination
    By oliverchua in forum Data
    Replies: 8
    Last Post: Sep 23rd, 2005, 06:06 PM
  3. Replies: 8
    Last Post: Jul 13th, 2005, 11:20 AM
  4. Query string - Depending on passed values
    By jonnybecker in forum Data
    Replies: 2
    Last Post: Jun 17th, 2005, 07:11 AM
  5. Enlisting Custom DataSource with JTa
    By shaby775 in forum Data
    Replies: 11
    Last Post: Sep 9th, 2004, 03:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •