I'm trying to do a simple update (using PostgreSQL) of bool field and get this exception: System.InvalidOperationException: Sequence contains no matching element Source query: Query.All<user>().Where(user => user.Locked).Set(user => user.Locked, false).Update(); There is 1 locked and 1 unlocked user in the table. Select query works fine and returns 1 user. Locked filed definition: [Field(Nullable = false, DefaultValue = false)] public bool Locked { get; set; } I tried to execute similar query on another entity type: Query.All<fileentry>().Where(file => file.Active).Set(file => file.Active, false).Update(); and get more interesting error from PostgreSQL: 2012-07-23 17:04:50 GST ОТМЕТКА: оператор: UPDATE "public"."Files" SET "Active" = ((FALSE)::bool) FROM "public"."Files"; 2012-07-23 17:04:50 GST ОШИБКА: имя таблицы "Files" указано больше одного раза Looks like translaction to SQL is incorrect. |
Hello Lucas,
I will check this soon. Could you clarify, what model of this entities and call stack of this exception?
Unfortunately I can't reproduce first exception in another project. Here is the test project that demonstrates second exception: https://dl.dropbox.com/u/2969279/BulkTest.zip