|
I have a SQL map as follows: <resultMap id="contacts" class="qcom.cas.mysourcej.poc.model.Contact">
<result property="name" column="contact_name"/>
<result property="primaryContact" column="primary_contact" /> </resultMap> The class Contact has a primaryContact field is boolean The result set is from a column that is equal to
‘Y’ or ‘N’ in the database. Is there a way to map a boolean property (primitive) to a
VARCHAR(1) NOT NULL column (that has either a ‘Y’ or a
‘N’)? This is a legacy database and there is no way I can change
the table. I could change the query. BTW I am new to iBatis, and I got it talking to a legacy db.
I also setup relationships fairly easily. I did notice the typeHandler attribute of
resultMap but this is not documented in the dtd or user documents. |
- RE: How do you map a Java boolean property to a VARCHAR(1) tha... Rick
