Skip to Content
Former Member
Oct 14, 2014 at 05:35 PM

Not able to run in condition in a collection


Hi ,

I have created a Enum as below.

     <enumtype code="EnumType" autocreate="true" generate="true" dynamic="true">
         <value code="E1" />
         <value code="E2" />

Then I have created a collection using the same.

 <collectiontype code="EnumTypeList"  elementtype="EnumType"  autocreate="true"    generate="true" type="list" />

I have assigned the collection as an attribute of a item:

 <itemtype code="NewItem" extends="Product" generate="true" jaloonly="false" autocreate="true" jaloclass="package.jalo.NewItem">
             <deployment table="NewItem" typecode="13301" />
             <attribute qualifier="enums" type="EnumTypeList"
                 generate="true" autocreate="true">
                 <persistence type="property" />
                 <modifiers read="true" write="true" search="true" optional="true" />

Now I am trying to run a query on the collection field . My intention is to check if any entries in this collection match to any entry of a list.

 select {a.code} from {NewItem as ni},{EnumType as et} where {a.code}='000091' and {} in ({ni.brands}) and {} in (?parameterList)

But this query is throwing an error as invalid number. Please help me with the same. I am completely stuck in it.