Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
-
Miros
- Posts: 45
- Joined: Thu 20 Jan 2011 10:12
-
Contact:
Post
by Miros » Thu 20 Jan 2011 10:20
When I load an element (orderline) from the DataContext, modify it and call SubmitChanges() I get the error "Row not found or changed", and when inspecting the query in the dbMonitor it looks like this:
Code: Select all
UPDATE nsalesdb_mikkel.orderline SET delivery_date = :p1, price = :p2, total = :p3 WHERE id = :key1 AND insert_time = :chk1 AND ((:nullchk2 = 1 AND update_time IS NULL) OR (update_time = :chk2)) AND delete_time = :chk3 AND deleted = :chk4 AND parent_orderline_id = :chk5 AND campaign_id = :chk6 AND offer_id = :chk7 AND offer_no = :chk8 AND order_id = :chk9 AND sort_id = :chk10 AND q_sort = :chk11 AND q_total = :chk12 AND quantity = :chk13 AND quantity_delivered = :chk14 AND delivery_date = :chk15 AND note = :chk16 AND status = :chk17 AND ext_status = :chk18 AND item_no = :chk19 AND item_no_cust = :chk20 AND sort_no = :chk21 AND color_group_code = :chk22 AND color_code = :chk23 AND size_group_code = :chk24 AND size_code = :chk25 AND campaign_no = :chk26 AND pocket_no = :chk27 AND type = :chk28 AND colli = :chk29 AND free_items = :chk30 AND extra_items = :chk31 AND colli_broken_fee_type = :chk32 AND free_of_charge = :chk33 AND no_order_discount = :chk34 AND item_cost_price = :chk35 AND colli_broken_fee = :chk36 AND discount = :chk37 AND price = :chk38 AND tax_fee = :chk39 AND total = :chk40 AND manual_price = :chk41 AND manual_discount = :chk42
I can't figure out what is wrong - it must be the WHERE clause that does something wrong - probably NULL or TIMESTAMP related?
-
StanislavK
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
Post
by StanislavK » Thu 20 Jan 2011 16:43
Could you please specify the definition of the 'orderline' table? If possible, please also
send us the model you are working with.
Two possible reasons of this issue may be that
- the row was changed after you've retrieved it, but before calling SubmitChanges();
- entity properties does not correspond to rows of the table (for example, if the row is nullable in the table, but is marked as not nullable in the model).
-
StanislavK
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
Post
by StanislavK » Mon 24 Jan 2011 18:01
Most probably, the issue is related to FLOAT columns. MySQL has known problems with comparing floating-point numbers:
http://dev.mysql.md/doc/refman/6.0/en/p ... float.html
Hence, using these columns in the WHERE clause may lead to unexpected results.
Possible workarounds are to either increase precision of these columns (e.g., by setting them to be of the DOUBLE type) or to disable update check for these fields (i.e., set the 'Update Check' property to 'Never').
We are considering setting Update Check to 'Never' by default for MySQL FLOAT fields, and will inform about the results here.
-
Miros
- Posts: 45
- Joined: Thu 20 Jan 2011 10:12
-
Contact:
Post
by Miros » Thu 27 Jan 2011 13:57
StanislavK wrote:Most probably, the issue is related to FLOAT columns. MySQL has known problems with comparing floating-point numbers:
http://dev.mysql.md/doc/refman/6.0/en/p ... float.html
Hence, using these columns in the WHERE clause may lead to unexpected results.
Possible workarounds are to either increase precision of these columns (e.g., by setting them to be of the DOUBLE type) or to disable update check for these fields (i.e., set the 'Update Check' property to 'Never').
We are considering setting Update Check to 'Never' by default for MySQL FLOAT fields, and will inform about the results here.
I tried converting all float columns to double - that didn't help, so I think that I'm forced to do the UpdateCheck="Never".
Is there any way of easily changing the UpdateCheck for a list of fields for a table or even better for all tables in a model? It takes forever to do this by hand in the designer field by field, and even worse, when the model is updated by dragging a table in from the Entity Developer Database Explorer the changes are lost.
Our model relies on ID's only for identifying records, and hence there is no need to include all fields in the table when doing an UPDATE - it would probably mean unnessecary overhead as well...
-
Miros
- Posts: 45
- Joined: Thu 20 Jan 2011 10:12
-
Contact:
Post
by Miros » Thu 27 Jan 2011 14:11
StanislavK wrote:Most probably, the issue is related to FLOAT columns. MySQL has known problems with comparing floating-point numbers:
http://dev.mysql.md/doc/refman/6.0/en/p ... float.html
Hence, using these columns in the WHERE clause may lead to unexpected results.
Possible workarounds are to either increase precision of these columns (e.g., by setting them to be of the DOUBLE type) or to disable update check for these fields (i.e., set the 'Update Check' property to 'Never').
We are considering setting Update Check to 'Never' by default for MySQL FLOAT fields, and will inform about the results here.
OK, now I have updated our model, setting all fields except Id primary key columns to UpdateCheck="Never".
That did the trick, and that is an OK solution for us - just would be nice if it was possible to select many fields in the Entity Developer Designer...

-
StanislavK
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
Post
by StanislavK » Thu 27 Jan 2011 18:08
It should be possible to modify properties for several columns at once. To select several columns, you can use the Ctrl and Shift keys.
We have changed behaviour for FLOAT MySQL columns: now Entity Developer sets 'Update Check' to 'Never' by default for them.
This change is available in the new 6.10.96 build of dotConnect for MySQL. This build can be downloaded from
http://www.devart.com/dotconnect/mysql/download.html
(the trial version) or from Registered Users' Area (for users with active subscription only):
http://secure.devart.com/
For the detailed information about the fixes and improvements available in dotConnect for MySQL 6.10.96, please refer to
http://www.devart.com/forums/viewtopic.php?t=20119
-
Miros
- Posts: 45
- Joined: Thu 20 Jan 2011 10:12
-
Contact:
Post
by Miros » Fri 28 Jan 2011 07:59
StanislavK wrote:It should be possible to modify properties for several columns at once. To select several columns, you can use the Ctrl and Shift keys.
Yes, it is possible to
select the columns, but the property UpdateCheck is grayed out (disabled) when selecting more than one column... Please see this screemshot:
http://jumbofiles.com/16rojtdjyegw/Sele ... s.png.html
-
StanislavK
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
Post
by StanislavK » Fri 28 Jan 2011 18:19
The 'Update Check' property cannot be changed for entity keys and fields of complex types. Provided that you are not selecting either of them, it should be possible to modify 'Update Check' for a set of field at once.
If you encounter this problem when no entity keys or complex type fields are selected, please
send us the model you are using so that we are able to investigate the issue in details.
-
Miros
- Posts: 45
- Joined: Thu 20 Jan 2011 10:12
-
Contact:
Post
by Miros » Fri 28 Jan 2011 20:00
What is the definition of complex types?
-
Miros
- Posts: 45
- Joined: Thu 20 Jan 2011 10:12
-
Contact:
Post
by Miros » Mon 31 Jan 2011 14:58
StanislavK wrote:A complex type is a user-defined type that may have several fields of simple data types or other complex types. For the detailed information about complex types and LinqConnect support for them, please refer to
http://www.devart.com/linqconnect/docs/ValueType.html
OK, the fields are not complex then - unless timestamp / System.Datetime is considered complex.
The Update Check property is disabled even when selecting two ordinary System.String (varchar(50)) fields...
-
StanislavK
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
Post
by StanislavK » Tue 01 Feb 2011 15:19
Could you please specify the version of LinqConnect you are using? There was a problem with changing 'Update Check' for several fields at once in prior versions, but it was fixed in the 2.0.8 version (the corresponding version of dotConnect for MySQL is 6.0.58 ). If you encounter this issue with the latest 2.20.11 build (dotConnect for MySQL 6.10.96), could you please
send us the model with which it occurs?
-
Miros
- Posts: 45
- Joined: Thu 20 Jan 2011 10:12
-
Contact:
Post
by Miros » Wed 02 Feb 2011 07:22
StanislavK wrote:Could you please specify the version of LinqConnect you are using? There was a problem with changing 'Update Check' for several fields at once in prior versions, but it was fixed in the 2.0.8 version (the corresponding version of dotConnect for MySQL is 6.0.58 ). If you encounter this issue with the latest 2.20.11 build (dotConnect for MySQL 6.10.96), could you please
send us the model with which it occurs?
Don't know the version of LinqConnect, but I have dotConnect for MySQL Professional 5.180.190.0.
-
StanislavK
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
Post
by StanislavK » Wed 02 Feb 2011 17:29
The fix was implemented in dotConnect for MySQL 6, please try downloading the latest 6.10.96 version. To get the credentials for version 6, please contact our Sales department: sales * devart * com .