Page 1 of 1

Number(1) = Boolean problem

Posted: Fri 08 May 2009 18:57
by Anchor
Hello,

I am encountering a problem where the schema defines some of the columns in the tables as a Number(1) and on the application side the Entity Framework/Devart interperets it as a Boolean. This is fine for the columns that store only "0"s and "1" but we store other values in there like "4" and "8". This causes a problem because we only get back "true" or "false" and we need the integer value.

Is there a way to tell the E.F or Devart to not model a column of type Number(1) as a Boolean and to model the property as an Int32?

I tried modifying the EDMX as suggested to someone who had a similar problem but it doesn't seem to work for me.

Thanks,
Joe

Posted: Fri 08 May 2009 21:03
by Anchor
In fact, I changed the EDMX file and I get the following error:

"The type 'Edm.Int32' of the member 'LOAD_STRUCTURE_ID' in the conceptual side type 'FPD.Models.ShareClassDO'does not match with the type 'System.Boolean' of the member 'LOAD_STRUCTURE_ID' on the object side type 'FPD.Models.ShareClassDO'."

Posted: Tue 12 May 2009 14:34
by Shalex
Please change this column type to "int" in the SSDL part and to "Int32" in the CSDL part.

Posted: Tue 12 May 2009 14:51
by Anchor
Yes, I did this and I still got the error that I posted earlier.

Posted: Tue 12 May 2009 15:52
by Shalex
Please rebuild the project after these changes are made.