mybatis generator: how to generate associations in Mappers for one to many, one to one relations

398 views
Skip to first unread message

Pritam

unread,
Dec 7, 2012, 10:43:33 AM12/7/12
to mybati...@googlegroups.com
Policy has many Vehicles, many Drivers. Naturally, the policy foreign key is in Driver and Vehicle. When I generate the models and Mappers through mybatis generators, the policy model does not have a collection of Drivers or Vehicles and there is no query in Mapper that performs the inner joins and returns the result in Policy.

Sure I can write this by hand. Does mybatis generator generate selects for relationships like one to many, one to one?

Jeff Butler

unread,
Dec 7, 2012, 12:17:21 PM12/7/12
to mybati...@googlegroups.com
The generator doesn't do relationships.

Jeff Butler
Reply all
Reply to author
Forward
0 new messages