Quantcast

can some one eyeball this potential criteria query bug?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

can some one eyeball this potential criteria query bug?

tony_k
i'm trying what seems like a simple query using some basic security classes generated by the s2-quickstart script from the spring-security-plugin (my 'user' entity is called 'SchoolAccount', so this query target is really the 'UserRole' join table from spring-security):

def c = SchoolAccountSecRole.createCriteria()
      def results = c.list
      {
        secRole
        { eq('authority', 'ROLE_LOCAL') }
      }


Stacktrace follows:
java.sql.SQLException: Column not found: SECROLE_AL1_.AUTHORITY in statement [select this_.sec_role_id as sec1_44_0_, this_.school_account_id as school2_44_0_ from school_account_sec_role this_ where (secrole_al1_.authority=?)]
        at org.hsqldb.jdbc.Util.throwError(Unknown Source)
        at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
        at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
        at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:281)
        at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:313)
        at $Proxy19.prepareStatement(Unknown Source)
        at grails.orm.HibernateCriteriaBuilder.invokeMethod(HibernateCriteriaBuilder.java:1163)
Loading...