Currently, foreing relations can be filled either by lazy loading or by doSelectJoin... methods.
The former causes one db hit per object and the latter causes much unnecessary data to be transferred if more than thwo related tables are filled.
Therefore, it should be possible to fill related objects by filler methods which take a Collection of objects and load the objects related by a foreign key.
The fill should happen by generating new filler methods in the peer classes. In order not to bloat the public API, the generation of these methods can be switched on by a generation option. The default is that the filler methods are not created.
For example, if the Book table has a foreign key on the author table, the methods Book.Peer.fillAuthors(List<Book>) and AuthorPeer.fillBooks(List<Author>) should be generated. They return the list of related objects, so cascaded filling is easy.