[odb-users] Initial load with join
PStath at Axxcelera.com
Thu Oct 30 15:02:41 EDT 2014
Boris <boris.20141030150531 at codesynthesis.com> writes:
> The ODB way to achieve what you want is to use views (Chapter 10). They
> not only allow you to load data from multiple objects, but you can also
> only load the data that you actually need.
> Now if you need to load all three objects completely, views can be quite
> awkward. To resolve this we are planning to add what we call object
> loading views. The syntax will be along these lines (not finalized yet):
> #pragma db view object(Job) object(JobSheet) object(Address)
> struct JobAndRelated
> std::shared_ptr<Job> job;
> This feature is pretty high up on our TODO list.
I assume this "object loading view" would result in a new VIEW in the database
schema that is contains an INNER JOIN with the related tables with appropriate
join conditions for the relationships.
So the above example simply means that columns from the Job, JobSheet,
and Address tables are added to the view implicitly rather than explicitly?
Please correct me if I'm not following.
More information about the odb-users