Boolean properties mapping

Boolean properties mapping

Postby Alladin » Wed 07 Apr 2010 18:02

Hi there,

I'd like to save my boolean fields as CHAR(1) datatype using following idea:
'Y' is for true, 'N' for false or as NUMBER(1) datatype with 1 or 0.

However LINQ to Oracle SQL is always trying to insert full-text sting 'False' and 'True'.

How to achieve my mapping logic?

Thank you in advance,
Lex
Alladin
 
Posts: 149
Joined: Mon 27 Nov 2006 16:18

Postby AndreyR » Thu 08 Apr 2010 14:38

I recommend you to create a wrapper boolean property for this column, like I advised in this post:
http://www.devart.com/forums/viewtopic.php?p=54625
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby Alladin » Sat 10 Apr 2010 01:17

Wrapping is not good, because you'll not be able to use this property in selects...
Alladin
 
Posts: 149
Joined: Mon 27 Nov 2006 16:18

Postby AndreyR » Mon 12 Apr 2010 16:52

I have replied to you here:
http://www.devart.com/forums/viewtopic.php?p=55470
NUMBER(1) mapping to bool should do the trick.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16


Return to LinqConnect (LINQ to SQL support)