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
|
Hello, i only want to report a bug: i have this Query in order to delete all MyEntities which where MyProperty == NULL Query toRemove = new Query But this does not work. The following sql is generated: FROM MyEntities WHERE MyEntities.MyProperty=NULL I think, that should be "==" instead of "=". I am using the current LS 3.0. My workaround is using the remove(Entity) method in a foreach. Bye and have a nice christmas time Markus |
|
|
Hi Markus, Thanks for reporting this. In general you should be comparing against null rather than DBNull.Value since you are writing a query in reference to your model rather than thinking about a database value but Ive added support to check for this; It will be available in 3.0 nightlies dated 20091221 and later. e.g. QueryExpression = Entity.Attribute("MyProperty") == null will generate an IS NULL check in the generated SQL.
Jeremy |
|