1 Reply Latest reply on Aug 13, 2002 5:24 PM by Dain Sundstrom

    EJB-SQL: with condition to compare two objects

    Eric Chow Apprentice

      Hello,

      <ejb-sql>
      select object(a) from MyEJB as a where a.x = ?1
      </ejb-ql>

      The java type of a.x is java.lang.Object,
      It failed when deployment. How can I compare the field with Object(BLOB) type in ejb-ql ?

      Best regards,
      Eric

        • 1. Re: EJB-SQL: with condition to compare two objects
          Dain Sundstrom Master

          EJB-QL does not support the comparison of Objects. JBossQL does support this, but you most likely will not get the results you expect. Since the comparison happens in the database server the database is complaint the bytes of the serialize object. The real problem is if you serialize an object twice with the same value, you are not guaranteed to get the same bytes. So you can do it, but it probably won't work.