[odb-users] Re: How to perform an aggregate subquery

Boris Kolpackov boris at codesynthesis.com
Tue Apr 9 23:40:26 EDT 2024


MM <finjulhich at gmail.com> writes:
 
> class B {
> date begin;
> date end;
> };
> 
> class A {
>   std::vector<B>  bs_;
> };
>  
> How to write the view to pick up the B row that matches the max index of
> the vector?
> Is the max() aggregation expressible neatly in a view?

ODB currently does not support containers in views (with the
exception of inverse containers that establish relationships).
So to accomplish this you will need to use a table (or native)
view over the container's underlying table.



More information about the odb-users mailing list