[Developers] OR operator in query
Christopher R. Maden
crism at metaweb.com
Mon Jun 23 07:05:05 UTC 2008
Christian Hirsch <hirsch.christian at gmail.com> wrote:
> The way you suggested it works great, except that I don't get the
> CVT's. Any suggestions on how to include them somehow in there?
There’s really no way to do a completely generic query *and* handle CVT-valued properties differently.
The display hints associated with the types themselves have enough information to make that decision, but obviously you can’t construct the query to handle them unless you’ve already inspected the types... which you can’t do until you know which types are involved.
So you really have two choices.
1) Take all properties two levels out as if they used CVTs. Include the type display hints in the query. Display the information differently depending on that display hint. These queries may well be slow and even time out.
2) Do two or more queries. Handle all properties generically but ask for the display hints of the expected types. For CVTs, make another set of queries for their properties. (There are various caching strategies you could use instead of asking about the display hints every time, but the fundamental approach is the same.)
If there were an easy way to do this, our Explore view would probably do it. (-:
~Chris
--
Christopher R. Maden
Data Architect
Metaweb Technologies, Inc.
<URL: http://www.metaweb.com/ >
More information about the Developers
mailing list