in

Problem when acess a FK NULL field.

Last post 02-25-2008 3:44 PM by carlos.klein. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-08-2008 12:25 PM

    Problem when acess a FK NULL field.

    When i try to acess one property FK NULL, i get one exception of type InvalidCastException. This happens when the field should be filled. When the field is null, the class is correctly filled, with null values in the FK field. Someone has a workaround for this? Bellow is the stack trace: StackTrace " at SubSonic.TableSchema.TableColumnSettingCollection.GetValue[T](String columnName)\r\n at SubSonic.RecordBase`1.GetColumnValue[CT](String columnName)\r\n at SubSonic.ActiveRecord`1.GetColumnValue[CT](String columnName)\r\n at Help23CL.Caixa.get_FuncionarioFuncionarioId() in d:\\projetos\\help23\\solucao\\help23cl\\dal\\caixa.cs:line 190\r\n at Help23CL.Caixa.get_Funcionario() in d:\\projetos\\help23\\solucao\\help23cl\\dal\\caixa.cs:line 229" string

  • 02-25-2008 3:44 PM In reply to

    Re: Problem when acess a FK NULL field.

    Answer

    Resolved. The key was an autoincremental UNSIGNED INT. After set to SIGNED INT, it works lika a charm!

    Thanks. 

Page 1 of 1 (2 items)