.NET Framework Developer Center > .NET Development Forums > Microsoft SQL Server Modeling > How initialise record with "General" type field in "M"
Ask a questionAsk a question
 

AnswerHow initialise record with "General" type field in "M"

  • Monday, September 21, 2009 5:00 PMashalnov Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    I have this type PersonInformation with "General" Value. I add two records: one string and one date.
    type PersonInformation
        {
            Value: General;
        } 
    

    I tried this code:

    
    PersonInformations:PersonInformation*
    {
        { Value=>"Schuhmacher"},
        { Value=>2001-12-21}
    }
    

     But date was added as 'string'. Now I define one temporaty date and add it to table. It's work but I hope that exist better solution?

     


    tmp:Date=>2001-12-21;
    
    PersonInformations:PersonInformation*
    {
        { Value=>"Schuhmacher"},
        { Value=>tmp}
    }
    

     

Answers

All Replies

  • Monday, September 21, 2009 8:16 PMdmatsonMSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Proposed Answer
    I've confirmed that this behavior is a bug (when compiling to SQL) related to using Date in a General column. Unfortunately, I am not aware of any better workaround than the one you are already using.

    I've filed this issue as a bug internally. My apologies for the inconvenience. I will post back here if I learn of a better workaround for you.

    Thanks for the feedback and for your interest in Oslo.

    David
    • Proposed As Answer bydmatsonMSFTTuesday, September 22, 2009 4:11 PM
    •  
  • Thursday, September 24, 2009 6:01 PMdmatsonMSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    The next CTP should have a fix for this situation.

    David