This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Have a bunch of assets that each have a collection of tags, Given a list of searchtags I want to retrieve a collection of assets who's collection of tags contains all of the searchtags, The more search tags the more accurate the result. Any ideas? I believe the answer lies in the EntityAtribute("Collection").Exists() but how do I specify what exists? IList<DomainModel.Asset> assets = Repository.Find<DomainModel.Asset>( Entity.Attribute("AssetTags.Tag.TagText") == searchtag ); // great works for one For many search tags I gave this a try: for each search tag query = query && Entity.Attribute("AssetTags.Tag.TagText") == tag but that definatly doesnt work since each tagtext can not == multiple things at the same time then I tried
Help Johannes |
|
|
Hi Johannes, Here's how to build the query: QueryExpression queryExpression = null; Unfortunately, in getting this to work I uncovered a bug in LightSpeed's query optimizer so I'll have to email you a pre-release build of 1.1 Cheers, Andrew.
|
|
|
Hi Andrew, Thank you for the pre-release but it's breaking a load of fundamental tests. I can email them to you if you want to have a look so using the pre-release is out of the question. I've inserted foreach (string tag in tags) into my code but of course still getting the incorrect SQL produced. I'm just setting up a separate project to see if the pre-release resolves my issue, if so I'll dive a little deaper to see why the new release is breaking so much stuff at our end.
Cheers
Johannes |
|