informix - Weird issue after upgrading to Nhibernate 3 -
hi have query mapped take date field. after upgrading nhibernate 3 following error:
could not execute query [ select a.agency_num, cd.comp_name, sd.sib_number, sd.sib_type_label, ad.add_line1, ad.add_line2, ad.add_line3, ad.add_line4, ad.post_code, ad.country_label agency a, company_details cd, sib_dets sd, address ad a.contact_ser = cd.contact_ser , a.contact_ser = sd.contact_ser , a.contact_ser = ad.contact_ser , a.current_ser = 10 , a.start_date <= ? , (a.end_date null or a.end_date >= ?) , cd.current_ser = 10 , cd.start_date <= ? , (cd.end_date null or cd.end_date >= ?) , sd.current_ser = 10 , sd.start_date <= ? , (sd.end_date null or sd.end_date >= ?) , ad.current_ser = 10 , ad.start_date <= ? , (ad.end_date null or ad.end_date >= ?) ] name:datevalid - value:18/02/2011 00:00:00 [sql: select a.agency_num, cd.comp_name, sd.sib_number, sd.sib_type_label, ad.add_line1, ad.add_line2, ad.add_line3, ad.add_line4, ad.post_code, ad.country_label agency a, company_details cd, sib_dets sd, address ad a.contact_ser = cd.contact_ser , a.contact_ser = sd.contact_ser , a.contact_ser = ad.contact_ser , a.current_ser = 10 , a.start_date <= ? , (a.end_date null or a.end_date >= ?) , cd.current_ser = 10 , cd.start_date <= ? , (cd.end_date null or cd.end_date >= ?) , sd.current_ser = 10 , sd.start_date <= ? , (sd.end_date null or sd.end_date >= ?) , ad.current_ser = 10 , ad.start_date <= ? , (ad.end_date null or ad.end_date >= ?)]
and inner exception is: {"the ifxparameter parametername 'p0' contained ifxparametercollection."}
anyone know why is? works fine under previous version on nhibernate
here nhibernate code:
using (isession session = nhibernatehelper.opensession(factory_name)) { iquery query = session.getnamedquery("getallagents"); query.setdatetime("datevalid", datevalid.date); agents = query.list<agencysearchdata>(); }
and here mapping file:
<?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="seidomain" namespace="sei.domain.entity"> <class name="agencysearchdata"> <id name="agencynumber" column="agency_num"/> <property name="name" column="comp_name" /> <property name="sibnumber" column="sib_number" /> <property name="sibtype" column="sib_type_label" /> <property name="address1" column="add_line1" /> <property name="address2" column="add_line2" /> <property name="address3" column="add_line3" /> <property name="address4" column="add_line4" /> <property name="postcode" column="post_code" /> <property name="country" column="country_label" /> </class> <sql-query name="getallagents"> <return alias="agencysearchdata" class="agencysearchdata"/> <![cdata[select a.agency_num, cd.comp_name, sd.sib_number, sd.sib_type_label, ad.add_line1, ad.add_line2, ad.add_line3, ad.add_line4, ad.post_code, ad.country_label agency a, company_details cd, sib_dets sd, address ad a.contact_ser = cd.contact_ser , a.contact_ser = sd.contact_ser , a.contact_ser = ad.contact_ser , a.current_ser = 10 , a.start_date <= :datevalid , (a.end_date null or a.end_date >= :datevalid) , cd.current_ser = 10 , cd.start_date <= :datevalid , (cd.end_date null or cd.end_date >= :datevalid) , sd.current_ser = 10 , sd.start_date <= :datevalid , (sd.end_date null or sd.end_date >= :datevalid) , ad.current_ser = 10 , ad.start_date <= :datevalid , (ad.end_date null or ad.end_date >= :datevalid)]]> </sql-query> </hibernate-mapping>
i believe might related nh-2529.
see if fix works you, , vote it.
Comments
Post a Comment