java - Ormlite join foreign columns -
i have following datatable:
@databasetable public class table_name { ... @databasefield(foreign = true, foreignautorefresh = true) private user createduser; @databasefield(foreign = true, foreignautorefresh = true) private user updateduser; .... }
and how can write following join query ormlite?
select t.* table_name t left join user cu on (cu.id=t.createduser.id) left join user uu on (uu.id=t.updateduser.id) cu.username="xxyy"
thanks in advance.
Comments
Post a Comment