Greetings, I'm having a similar problem mapping a bit field to a boolean but in my case I'm having the issue when I try to insert a record into a SQL Sever 2000 bit field.
My property mapping is as such
<property name="Rohs" column="Rohs_Flag" not-null="true" type="Boolean"/>
I've got the query substitution defined as follows:
<property name="query.substitutions">True 1, False 0, yes 1, no 0</property>
When I try to persist a record with the Boolean set, HQL generates the following query:
INSERT INTO Staging_Area (Price, Mfr_Code, Rohs_Flag,...VALUES (@p0, @p1, @p2, @p3, ...);
@p0 = ''123"
@p1 = 'Foo'
@p2 = 'False'
@p(n)...
How can I make the insert statement generate a 1 or a 0 for True or False?
Must I use the formula attribute as in this
post?
thanks,