1 Reply Latest reply on Dec 27, 2002 10:31 AM by Alexey Loubyansky

    JDBCLoadEntityCommand generate ugly sql on load entity

    kammi Newbie

      With version jboss-3.0.0_tomcat-4.0.3
      I found them in log file such as
      2002-12-27 14:30:52,832 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.FeeDetail] Executing SQL: SELECT ID,USERINFO_ID, BEFORE_FEE, FEE, AFTER_FEE, FEETYPE_ID, CREATE_TIME, ADDOPR FROM FEE_DETAIL WHERE (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?) OR (ID=?)

      and
      2002-12-27 14:30:49,603 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserLogin] Executing SQL: SELECT USERINFO_ID, LOGIN_TIME,IP, LOGOUT_TIME, QUITTYPE_ID, ONLINE_TIME, FOREIGN, FEE, NATIVE FROM USER_LOGIN WHERE (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?)
      2002-12-27 14:30:51,692 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.UserLogin] Executing SQL: SELECT USERINFO_ID, LOGIN_TIME,IP, LOGOUT_TIME, QUITTYPE_ID, ONLINE_TIME, FOREIGN, FEE, NATIVE FROM USER_LOGIN WHERE (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?) OR (USERINFO_ID=? AND LOGIN_TIME=?)

      and some are much longer than these( OR clause appears about 300 times )

      I checked the source and it should be generated in JDBCLoadEntityCommand.java (package org.jboss.ejb.plugins.cmp.jdbc;),and I think there's something I have mis-configed,
      but I don't know how to solve this problem, may this cause more serious problem ?

      Hope somebody would help me.

      thanks all.