Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to make IN query with Counter fields #20

Open
sadomovalex opened this issue Sep 26, 2017 · 1 comment
Open

Unable to make IN query with Counter fields #20

sadomovalex opened this issue Sep 26, 2017 · 1 comment
Labels

Comments

@sadomovalex
Copy link
Owner

n0e[CodePlex]
Camlex fails when trying to parse a query like this:
ltWheregt
ltIngt
ltFieldRef Name=quotIDquot /gt
ltValuesgt
ltValue Type=quotCounterquotgt0lt/Valuegt
ltValue Type=quotCounterquotgt1lt/Valuegt
ltValue Type=quotCounterquotgt2lt/Valuegt
lt/Valuesgt
lt/Ingt
lt/Wheregt

Trying to use something similar in VS code gives compiler warnings:
Camlex.Query().Where(x =gt ids.Contains((DataTypes.Counter)x[quotIDquot])).ToString();

@sadomovalex
Copy link
Owner Author

sadomovalex[CodePlex]
hi n0e,
thank you for reporting it, will address it when will have in one of the next releases. For a while you may use the following workaround:
var ids = new[] {0, 1, 2};
string s = Camlex.Query().Where(x = ids.Contains((int)x[ID])).ToString();
s = s.Replace(Integer, Counter);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant