Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
From ibatis to mybatis - objects not fully (or at all) populated by selects?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
dq  
View profile  
 More options Oct 29 2012, 2:01 pm
From: dq <d...@kayak.com>
Date: Mon, 29 Oct 2012 11:01:02 -0700 (PDT)
Local: Mon, Oct 29 2012 2:01 pm
Subject: From ibatis to mybatis - objects not fully (or at all) populated by selects?

I'm trying to migrate some DB access from ibatis to mybatis 3.1.1 and I'm
having a lot of trouble with some selects.  In one case the object would be
partially populated with data from the select, but not all of the fields
that were selected and mapped were getting set on the object.  No
exceptions, it just partially filled the object.  The resultMap contained
an association, and I thought that might be the cause so I removed that and
it still wasn't filling in data I expected to.  I then stripped the select
and the resultmap down to just a couple fields and now all of the ones in
the stripped down select are being populated correctly.  

In another case I've got a select that's returning a null object even
though it should find data in the database.  I turned on debug logging and
copied and pasted the query into mysql and I'm seeing a result just as I
expect.

Either I'm doing something fundamentally wrong, or I'm stumbling on a
bug... (After the mybatis-spring issue I had with multiple databases, I
suspect this is quite possible)

About 1/3rd of my unit tests are passing right now.  Some of the problems
may be caused by mistakes I made in the porting to mybatis, but the first
few I've looked at have had me scratching my head as described.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »