Multiple table join auto mapped?

129 views
Skip to first unread message

Ivan

unread,
Feb 3, 2012, 4:00:39 PM2/3/12
to ORMLite Users
I prefer writing out my sql joins and using it in queryRaw, but I was
wondering if there was someway to reuse ORMLites built in object
mapper instead of handcoding my own via RawRowMapper. In my case I'm
simply returning a list of objects which is already mapped by ORMLite
with annotations, but the where/join clause is fairly complicated.

Is there a method that does this already? Or maybe I missed a
ObjectRowMapper<T> or something like that somewhere...

jc

unread,
Feb 6, 2012, 11:45:17 AM2/6/12
to ORMLite Users
On Feb 3, 3:00 pm, Ivan <ivan.laza...@gmail.com> wrote:
>
> Is there a method that does this already?  Or maybe I missed a
> ObjectRowMapper<T> or something like that somewhere...

Check out the "getSelectStarRowMapper()" or
"mapSelectStarRow(DatabaseResults)" methods of Dao. The method names
don't make it obvious to find, but it sounds like you just want the
default mapper returned by getSelectStarRowMapper().

http://ormlite.com/javadoc/ormlite-core/com/j256/ormlite/dao/Dao.html#getSelectStarRowMapper()
Reply all
Reply to author
Forward
0 new messages