Reference

Issues and Resolutions

Known issues in the ARX.SDK packages and on this site, what each affects, and what was done or what to do meanwhile.

Every known issue is published here with what it affects and its resolution. A fix is listed as fixed in the version that ships it; until that version is on nuget.org, the workaround applies. To report an issue, write to migslab.dev@gmail.com (see Security and Support); for questions, there is the ARX.SDK Discord.

Fixed

  • ARX-1The core package adds public helper classes to the System and System.Data namespacesFixed in 0.1.0-preview.4

    Affects: ARX.SDK 0.1.0-preview.1 to preview.3

    The helpers are internal. In preview.3 they add methods such as ToInt() and IsEmpty() to every object, and naming .NET's System.Data.DataTableExtensions fails to compile (CS0433: the type exists in both assemblies).

    Meanwhile: Call the .NET method as an extension method, dataTable.AsEnumerable(), instead of through the class name.

  • ARX-2GetAttributeValue<int> of a NULL column throws NullReferenceExceptionFixed in 0.1.0-preview.4

    Affects: ARX.SDK 0.1.0-preview.1 to preview.3

    A null value gives the type's default (0 for int), as the method's documentation says.

    Meanwhile: Read a nullable column with a nullable type: GetAttributeValue<int?>("employee_count").

  • ARX-3The ArxRecordId that Create returns is refused as a condition value (ARX1007)Fixed in 0.1.0-preview.4

    Affects: Every provider, 0.1.0-preview.1 to preview.3

    An ArxRecordId is accepted wherever a value is: conditions, In lists and attributes.

    Meanwhile: Pass its value: AddCondition("id", ArxConditionOperator.Equal, id.Value).

  • ARX-4MongoDB: Like and NotLike are case-sensitiveFixed in 0.1.0-preview.4

    Affects: ARX.SDK.MongoDb 0.1.0-preview.1 to preview.3

    Like and NotLike ignore case, as on the other providers and as Contains, BeginsWith and EndsWith already did. A query that relied on case matches without it from preview.4.

    Meanwhile: Use Contains, BeginsWith or EndsWith, which ignore case, where the pattern allows.

  • ARX-5Aggregates leave out the group-by columns the column set doesn't nameFixed in 0.1.0-preview.4

    Affects: PostgreSQL, SQL Server and MySQL, 0.1.0-preview.1 to preview.3

    Each group's record carries its group-by columns, as on MongoDB.

    Meanwhile: Add the group-by columns to the query's ColumnSet too.

  • ARX-6MongoDB: a Count reads back as an int, a long elsewhereFixed in 0.1.0-preview.4

    Affects: ARX.SDK.MongoDb 0.1.0-preview.1 to preview.3

    A Count, CountBig or CountDistinct is a long on every provider. Code that casts a MongoDB count to int changes to long.

    Meanwhile: Read counts with Convert.ToInt64(row["n"]), which works on every provider and version.

  • ARX-7MongoDB and DynamoDB sample pages: the first run fails because the sample tables don't existFixed on this site

    Affects: This site's MongoDB and DynamoDB sample pages

    Each sample page's Program.cs remakes the sample database from sample-schema.json, which Get started now says to save in the project folder.

  • ARX-8Type pages listed no methodsFixed on this site

    Affects: This site's Types pages

    Every type page has a Methods section with each method's signature and description.

  • ARX-9Pages disagreed on whether ARX reads ids from the database, and on the connection variable's nameFixed on this site

    Affects: Installation, Quick Start, the ARX1016 description, the specification

    Installation shows the three ways to describe tables (a catalog, a preload, no catalog), and every page reads ARX_SAMPLES_POSTGRESQL. The benchmark page's outdated "Where ARX stands" table was corrected too.

  • ARX-10SQL Server: an aggregate grouped by a declared lookup column fails (ARX5002)Fixed in 0.1.0-preview.4

    Affects: ARX.SDK.SQL 0.1.0-preview.3; the other SQL providers not yet checked

    A grouped query reads a lookup column as its id only, without the display-name join that broke GROUP BY.

    Meanwhile: Pass new ArxRetrieveOptions { LookupNames = false } to the RetrieveMultipleAsync call.

  • ARX-11A lookup's target table isn't checked against its .Lookup declarationFixed in 0.1.0-preview.4

    Affects: SQL providers, 0.1.0-preview.3

    A reference to another table than the column's declared .Lookup is refused before the database, with ARX1005 InvalidLookup.

  • ARX-12SQL Server: a foreign key error on Create names the referenced tableFixed in 0.1.0-preview.4

    Affects: ARX.SDK.SQL 0.1.0-preview.3

    The message names the table written ("Create on 'contact'") and the referenced table whose row is missing.

  • ARX-13MySQL: UpdateMultiple's not-found message reports the wrong countFixed for the next release (not yet released)

    Affects: ARX.SDK.MySQL 0.1.0-preview.3 and preview.4

    It said "1 of 1 entities" when one of three matched no row, because a call split into several statements reported the failing statement's own count. The next release counts the call: "at least 1 of 3 entities matched no row" (the check stops at the first statement with one missing). The rollback was always correct: nothing is written. Until then, read the count as the failing statement's.

  • ARX-14DynamoDB: an entity missing from the schema catalog makes Create return no idFixed in 0.1.0-preview.4

    Affects: ARX.SDK.DynamoDb 0.1.0-preview.3

    With a catalog, an entity of the model that the catalog doesn't declare is refused with ARX1016 IdNotDeclared, as on the other providers.

    Meanwhile: Declare every entity of the model in the catalog with its id: .Table("customer", ArxIdColumn.Supplied<string>("customer_id")).

  • ARX-15Optimistic concurrency was available on DynamoDB onlyFixed in 0.1.0-preview.4

    Affects: PostgreSQL, SQL Server, MySQL, MongoDB

    Every provider checks a version column declared with .Version(table, column): a stale update or delete is ARX2004 RecordChanged and writes nothing; required: true refuses an update without the version.

  • ARX-18An update or delete by a key or by columns didn't check the version columnFixed for the next release (not yet released)

    Affects: ARX.SDK.PostgreSql, ARX.SDK.SQL, ARX.SDK.MySQL and ARX.SDK.DynamoDb 0.1.0-preview.4

    With a version column declared (.Version(table, column)), an update or delete that found its rows with ArxMatch.Key or ArxMatch.Columns wrote a stale version over the current one and deleted rows changed since they were read: concurrent updates could be lost. Matching by id was always checked. The next release checks every kind of match (ARX2004 RecordChanged, nothing written).

    Meanwhile: Until then, update and delete versioned tables by id.

  • ARX-19A read didn't return the version column unless asked for, so read-change-update wasn't checkedFixed for the next release (not yet released)

    Affects: Every provider, 0.1.0-preview.4

    A record read with a column set that didn't name the version column came back without it, so the update that followed carried no version and wasn't checked (last writer wins). The next release reads a declared version column with every record, as it reads the id.

    Meanwhile: Until then, add the version column to every column set of a versioned table.

  • ARX-20RunBatchAsync returned normally after a caught failure had rolled the scope backFixed for the next release (not yet released)

    Affects: Every provider, 0.1.0-preview.4 (MongoDB and DynamoDB, and SQL with Savepoints = false)

    A body that caught a failed call and returned left RunBatchAsync returning as if the work were saved, when the failed call had rolled the whole scope back and nothing was. The next release throws ARX1015 TransactionAborted when the body returns.

    Meanwhile: Until then, don't catch a failed call inside RunBatchAsync on these providers: let it propagate.

  • ARX-21MongoDB: a cancelled write could be reported as cancelled but still be appliedFixed for the next release (not yet released)

    Affects: ARX.SDK.MongoDb 0.1.0-preview.4

    A write outside a transaction, cancelled while the server was already running it (for example blocked behind another transaction), threw a cancellation while the server applied it later. The next release honours the token until the write is sent, then waits for the outcome, so what the caller is told matches the database.

    Meanwhile: Until then, write inside an ArxTransaction where cancellation must leave nothing behind.

  • ARX-22DynamoDB and MongoDB: text written to a declared date, time, Guid or bool column broke later readsFixed for the next release (not yet released)

    Affects: ARX.SDK.DynamoDb and ARX.SDK.MongoDb 0.1.0-preview.4

    A column the catalog declares as DateOnly, TimeOnly, TimeSpan, DateTimeOffset, Guid or bool accepted a value of another type, so text such as "yesterday" was stored and every later read of the item failed with ARX5003. The next release refuses such a value with ARX4004 DataTypeMismatch, in writes and conditions; text is never parsed as a date or time.

    Meanwhile: Until then, write those columns with values of the declared .NET type (DateOnly, TimeOnly, Guid, bool), never as text.

  • ARX-23Grouping by a link column the link also reads is refused as ARX1004Fixed for the next release (not yet released)

    Affects: ARX.SDK.PostgreSql, ARX.SDK.SQL and ARX.SDK.MySQL 0.1.0-preview.4

    A query that lists a column in a link's column set and also groups by it (AddGroupByColumn("r.name")) was refused with ARX1004 DuplicateAttribute, because the group-by column was added to the select list before the link's. The next release reads it once.

    Meanwhile: Until then, leave the column out of the link's ColumnSet: the group-by column is read back under the same name.

  • ARX-24MongoDB: a group-by on a lookup returns the raw idFixed for the next release (not yet released)

    Affects: ARX.SDK.MongoDb 0.1.0-preview.4

    A group-by on a declared lookup column read back as the referenced record's id, where the SQL providers and every other MongoDB read return an ArxEntityReference. The next release returns the reference.

    Meanwhile: Until then, read the group key with GetAttributeValue of the id's type, which accepts both.

By design

  • ARX-16The same query can return different rows on different databasesBy design, documented

    Affects: Every provider

    Text comparison, null ordering and comparisons between values of different types follow each database. Switching providers lists them, with the ways to keep a query portable.

  • ARX-17Update throws when nothing matches; Delete returns falseBy design, documented

    Affects: Every provider

    UpdateAsync raises ARX2002 RecordNotFound; DeleteAsync returns false and DeleteMultipleAsync the count; RetrieveAsync returns null.