0
Fixed

Comparison of SingleValues in IdentityBroker fails with exception "Property 'Single Value' is not defined for type 'System.Nullable`1[System.Double]'"

Tony Sheehy 12 years ago updated by anonymous 8 years ago 2

The following exception is thrown when a comparison is made between two DoubleValues, through an interLINQ query from management studio:

Property 'Single Value' is not defined for type 'System.Nullable`1[System.Double]'

with a complete stack trace of:

   at System.Linq.Expressions.Expression.Property(Expression expression, PropertyInfo property)
   at Unify.Product.IdentityBroker.Repository.NativeTypeInformation`4.CreateEntityValueTypeExpressionBase(Expression tableMember) in S:\hg\Product\IdentityBroker\b\Source\Entity\Unify.IdentityBroker.Entity.Repository.Sql\NativeTypeInformations\NativeTypeInformation.cs:line 303
   at Unify.Product.IdentityBroker.Repository.NativeTypeInformation`4.CreateEntityValueTypeExpression(Expression sourceExpression) in S:\hg\Product\IdentityBroker\b\Source\Entity\Unify.IdentityBroker.Entity.Repository.Sql\NativeTypeInformations\NativeTypeInformation.cs:line 76
   at Unify.Product.IdentityBroker.Repository.NativeTypeInformation`4.CreateDataValueExpression(BinaryExpression originalExpression, ExpressionType nodeType, IEntityExpressionVisitor entityExpressionVisitor, Expression parameterExpression, Expression valueExpression) in S:\hg\Product\IdentityBroker\b\Source\Entity\Unify.IdentityBroker.Entity.Repository.Sql\NativeTypeInformations\NativeTypeInformation.cs:line 280
   at Unify.Product.IdentityBroker.Repository.NativeTypeInformation`4.GetGetValueBinaryExpression(Expression left, Expression right, BinaryExpression binaryExpression, ExpressionType nodeType, IEntityExpressionVisitor entityExpressionVisitor) in S:\hg\Product

The comparison code is the following:

SingleValue innerValue = float.Parse(value);
                                return queryable => from item in queryable
                                                    where item.Contains(schemaKey) &&
                                                          item.GetValue<SingleValue>(schemaKey) < innerValue
                                                    select item;

Alternatively the behaviour can be replicated by creating a SingleValue comparison search query through the new entity search UI.

I believe I have resolved this issue.

Could you please confirm?

This has been confirmed correct through the entity search UI.