Re: iBATIS 3.0 selectOne SessionException if no data found

2009-08-27 Thread Thomas G. Schuessler
serIds(String email); } Keep the dao method the same... public long getUserId(String email) { but just do a quick check in there on the size of the List returned, and do what you want with it (throw you own exception if over size 1?) and then just always return list.get(0) On Wed, Aug 26, 20

iBATIS 3.0 selectOne SessionException if no data found

2009-08-26 Thread Thomas G. Schuessler
In my MySQL db, I have a table 'users' with (amongst others) these fields: `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `email` varchar(120) NOT NULL, In UserMapper.java I have the following method public interface UserMapper { public long getUserId(String email); } In UserMapper.xml