We use FieldCompareRangePredicate and here is the code:
Dim values1 As New ArrayList()
Dim i As Integer
For i = 0 To 10
values1.Add(i)
Next
Dim bucketRelation As IRelationPredicateBucket = New RelationPredicateBucket()
bucketRelation.PredicateExpression.AddWithAnd(New FieldCompareRangePredicate(qheaderFields.qnumber, False, values1))
In the last line of this code we get the error as following
Overload resolution failed because no accessible 'New' can be called without a narrowing conversion:
'Public Sub New(field As SD.LLBLGen.Pro.ORMSupportClasses.IEntityField, negate As Boolean, ParamArray values() As Object)': Argument matching parameter 'field' narrows from 'SD.LLBLGen.Pro.ORMSupportClasses.EntityField2' to 'SD.LLBLGen.Pro.ORMSupportClasses.IEntityField'.
'Public Sub New(field As SD.LLBLGen.Pro.ORMSupportClasses.IEntityField, objectAlias As String, ParamArray values() As Object)': Argument matching parameter 'field' narrows from 'SD.LLBLGen.Pro.ORMSupportClasses.EntityField2' to 'SD.LLBLGen.Pro.ORMSupportClasses.IEntityField'.
'Public Sub New(field As SD.LLBLGen.Pro.ORMSupportClasses.IEntityField, objectAlias As String, ParamArray values() As Object)': Argument matching parameter 'objectAlias' narrows from 'Boolean' to 'String'.
'Public Sub New(field As SD.LLBLGen.Pro.ORMSupportClasses.IEntityField, ParamArray values() As Object)': Argument matching parameter 'field' narrows from 'SD.LLBLGen.Pro.ORMSupportClasses.EntityField2' to 'SD.LLBLGen.Pro.ORMSupportClasses.IEntityField'.
We have similar error when we use FieldCompareSetPredicate.
If we set negate to the bucketrelation as a second step like bucketRelation.negat=true, it works but it applies the negate to both conditions.
What am I missing?
I am running with LLBLGen 2.0 with Adapter.
Thanks.