I have a rather odd problem, but I've noticed I've continually wanted to
perform the following:
select(...)
.from(TABLE)
.join(OTHER).on(...)
.join(CHILD).on()
.where(...)
.fetchInto(Table.class);
What I really want in the class is:
class Table
{
@Id
@Column(name=...)
private Long id;
@Column(name=...)
@OneToOne
private Other other;
@OneToMany(...)
private List<Child> children;
}
This is about as complex as it gets for 90% of my crud cases. Having the
ability to populate the relationships automatically, would completely
eliminate my need for heavy ORMs such as Hibernate.
Can fetchInto already do this? If not, how much work would it be to get it
to do this?