[odb-users] Querying on Containers

Lukas Obermann obermann.lukas at gmail.com
Tue Oct 18 05:54:41 EDT 2016


Hi Boris,

sorry für the delay.

So, I have this view:
#pragma db view \
object(main) \
object(ClassA = a: main::ptr_a) \
object(ClassA = list_a: main::list_a) \
object(ClassB = b: main::ptr_b)
...

So, accessing and querying 'a' and 'list_a' works perfectly.
but when now trying query:
query::b::ptr_c->iNeedToBeQueried == "SomeValues"
it simply does not know the 'iNeedToBeQueried' value.
Also tried:
query::b::ptr_c::iNeedToBeQueried == "SomeValues"
with the same result.

I assume that I somehow have to make ClassC visible within the view?

Thanks,
Lukas



Boris Kolpackov <boris at codesynthesis.com> schrieb am Mo., 10. Okt. 2016 um
15:45 Uhr:

> Hi Lukas,
>
> Lukas Obermann <obermann.lukas at gmail.com> writes:
>
> > But still can't figure out how to access the element in ClassC in
> > the query.
>
> You should be able to just join it to the view since it has an
> unambigous relationship (main->ptr_b->ptr_c). What exactly have
> you tried and what doesn't work?
>
> Boris
>


More information about the odb-users mailing list