[odb-users] Emulating a sql union in ODB

Boris Kolpackov boris at codesynthesis.com
Tue Apr 15 16:22:51 EDT 2014


Hi David,

David Stocking <dstocking at extensionhealthcare.com> writes:

> I thought I could pull this off with views and polymorphic types
> but I haven’t been able to figure out how I could. Is this possible?

I doubt it.


> Should I even bother trying to get this query in a non native form or
> should i just make this huge query of doom a native sql query view?

Views work in terms of JOINs (non-native views, that is). So if you
can re-implement the same logic using JOINs, then your could use
(non-native) views. Also, splitting the query into multiple result
sets and then combining them at the application level could be a way
to simplify things. But it might affect performance (either way, in
fact) so test first.

Otherwise, just use a native view.

Boris



More information about the odb-users mailing list