Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.0
Mapping documents:
<property name="isDeletable"
formula="(select count(memberProgram.PROG_LVL) from MBR_PROGRAM memberProgram where memberProgram.PROG_ID = PROG_ID and memberProgram.PROG_LVL = PROG_LVL)"
type="int" />
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
14:04:49,769 ERROR [JDBCExceptionReporter] [IBM][CLI Driver][DB2] SQL0104N An unexpected token "(" was found following "". Expected tokens may include: ", FROM INTO ". SQLSTATE=42601
14:04:49,769 ERROR [JDBCExceptionReporter] [IBM][CLI Driver][DB2] SQL0104N An unexpected token "(" was found following "". Expected tokens may include: ", FROM INTO ". SQLSTATE=42601
Name and version of the database you are using: DB2 UDB
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Hi, I'm trying to see if there is an element PROG_LVL present in the memberProgram table using
<property name="isDeletable"
formula="(select count(memberProgram.PROG_LVL) from MBR_PROGRAM memberProgram where memberProgram.PROG_ID = PROG_ID and memberProgram.PROG_LVL = PROG_LVL)"
type="int" />
I tried even other sql statements like :
formula="(select memberProgram.PROG_LVL from MBR_PROGRAM memberProgram where memberProgram.PROG_ID = PROG_ID and memberProgram.PROG_LVL = PROG_LVL)"
but its giving me errors in the SQL syntax.
pls advice me on this..
Thanx.