Skip to content

Conversation

mShan0
Copy link
Contributor

@mShan0 mShan0 commented Nov 25, 2022

The fix uses JSON_PATH_EXISTS which was introduced in SQL Server 2022.

This fixes the following test from the Django 4.1 list:

'model_fields.test_jsonfield.TestQuerying.test_has_key_number',

Also fixes the following tests:

'model_fields.test_jsonfield.TestQuerying.test_has_key_list',
'model_fields.test_jsonfield.TestQuerying.test_has_key_null_value',
'model_fields.test_jsonfield.TestQuerying.test_lookups_with_key_transform',
'model_fields.test_jsonfield.TestQuerying.test_ordering_grouping_by_count',

@maikhanhbui maikhanhbui merged commit 4d3aa42 into django41 Dec 1, 2022
@maikhanhbui maikhanhbui deleted the jsonfield-tests branch December 1, 2022 18:15
mShan0 added a commit that referenced this pull request Dec 8, 2022
* Fixed failing timezone unit test for Django 4.1 (#169)

* Added Django 4.1 tests into test suite

* Fixed datetime issues

* Added skipped timezone tests

* fix date_trunc_sql to work with < 4-digit year

set has_case_insensitive_like to True

Revert "fix date_trunc_sql to work with < 4-digit year"

This reverts commit 492e32c.

Revert "set has_case_insensitive_like to True"

This reverts commit 2bc4f8e.

fix date_trunc_sql to work with < 4-digit year (#188)

* set has_case_insensitive_like to True (#189)

Co-Authored-By: Khanh Bui <85855766+khanhmaibui@users.noreply.github.com>

Co-authored-by: Khanh Bui <85855766+khanhmaibui@users.noreply.github.com>

* bump required django version to include 4.1.x updates (#192)

* add introspected field type for DurationField (#191)

* Add check to see if `FROM` clause exists (#190)

* Make MSSQL introspection raise DatabaseError on nonexistent tables (#194)

* Make MSSQL introspection raise DatabaseError on nonexistent tables

* edit error message to make it specific to MSSQL

* Refix JSONField has_key so it doesn't break previous Django versions (#195)

* Fix removing unique_together constraint if exists primary key/unique constraint on the same field. (#204)

* Fix removing unique_together constraint if
 exists primary key/unique constraint on the same field.

* add django version requirement

* fix jsonfield test in sql server 2022 and newer (#203)

* fix jsonfield test in sql server 2022

* fix sql server version

* fix bulk update tests (#205)

* match native  function updates

* syntax update

* fix `mssql-django` tests

* trim whitespace

* create custom `Window.as_sql` (#207)

Co-Authored-By: Khanh Bui 85855766+khanhmaibui@users.noreply.github.com

* Add skipped tests to Django 4.1 (#199)

Skips the currently unfixable tests added by Django 4.1

Co-authored-by: mShan0 <mark.shan19@gmail.com>

Co-authored-by: jmah8 <59151084+jmah8@users.noreply.github.com>
Co-authored-by: Khanh Bui <khanhmb815@gmail.com>
Co-authored-by: Khanh Bui <85855766+khanhmaibui@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants