none
Discriminator Values: Scalar only? RRS feed

  • Question

  • When playing around with the discriminator values, I've only been able to get scalar values (strings, ints, "True"/"False") to succeed. Looking around at examples, that's all I see as well. I have looked far and wide either an example of using somehting non-scalar (such as expressions or null/not null) or some confirmation that it is not possible. 

     

    "Scalar only" makes sense to me, but I just can't seem to locate any statement that indicates whether or not you could do something like this and I don't want to make that assumption if I"m just missing something and there are actually other ways to use use the discriminator.

     

    Thanks

     

    julie

    Monday, March 31, 2008 2:26 PM

Answers

  • Yes, discriminator values can only be scalar.  The property identified for the descriminator must map to a single database column.

    Tuesday, April 1, 2008 6:20 PM
    Moderator

All replies

  • I don't think non-scalar values can be used as discriminators (and some scalars like GUIDs can also not be used as discriminators).

     

    I'm not sure if this is documented anywhere - I couldn't find any public docs on it either.

     

    Please file a bug at connect.microsoft.com.

     

    Thanks,

     

    --Samir

     

    Monday, March 31, 2008 6:47 PM
  • Yes, discriminator values can only be scalar.  The property identified for the descriminator must map to a single database column.

    Tuesday, April 1, 2008 6:20 PM
    Moderator
  • thanks for the clarification!

    Thursday, April 3, 2008 2:07 PM