From b83b8247c295e7ea0e9a76824a01ef29d29fdeec Mon Sep 17 00:00:00 2001 From: silverqx Date: Sun, 21 Apr 2024 15:05:54 +0200 Subject: [PATCH] docs used /qt/ in URLs instead of /qt-6/ --- docs/tinyorm/collections.mdx | 16 ++++++++-------- docs/tinyorm/serialization.mdx | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/tinyorm/collections.mdx b/docs/tinyorm/collections.mdx index ba6b48d70..76f59422b 100644 --- a/docs/tinyorm/collections.mdx +++ b/docs/tinyorm/collections.mdx @@ -15,7 +15,7 @@ keywords: [c++ orm, orm, collections, collection, model, tinyorm] The `Orm::Tiny::Types::ModelsCollection` is specialized container which provides a fluent, convenient wrapper for working with vector of models. All TinyORM methods that return more than one model result, will return instances of the `ModelsCollection` class, including results retrieved via the `get` method or methods that return relationships like the `getRelation` and `getRelationValue`. -The `ModelsCollection` class extends `QVector`, so it naturally inherits dozens of methods used to work with the underlying vector of TinyORM models. Be sure to review the [`QList`](https://doc.qt.io/qt-6/qlist.html) documentation to learn all about these helpful methods! +The `ModelsCollection` class extends `QVector`, so it naturally inherits dozens of methods used to work with the underlying vector of TinyORM models. Be sure to review the [`QList`](https://doc.qt.io/qt/qlist.html) documentation to learn all about these helpful methods! :::info The `ModelsCollection` template parameter can be declared only with the model type or a model type pointer, it also can't be `const` and can't be a reference. It's constrained using the `DerivedCollectionModel` concept. @@ -328,7 +328,7 @@ If no model passes a given truth test then the value of the second `defaultModel {"votes", NullVariant::ULongLong()}} */ -You can also call all `first` overloads provided by the [`QList::first`](https://doc.qt.io/qt-6/qlist.html#first). +You can also call all `first` overloads provided by the [`QList::first`](https://doc.qt.io/qt/qlist.html#first). #### `firstWhere()` {#method-first-where} @@ -434,7 +434,7 @@ If no model passes a given truth test then the value of the second `defaultModel {"votes", NullVariant::ULongLong()}} */ -You can also call all `last` overloads provided by the [`QList::last`](https://doc.qt.io/qt-6/qlist.html#last). +You can also call all `last` overloads provided by the [`QList::last`](https://doc.qt.io/qt/qlist.html#last). #### `load()` {#method-load} @@ -820,21 +820,21 @@ The [`toBase`](#method-tobase) is an alias to the `all` method. #### `toJson()` {#method-tojson} -The `toJson` method converts the collection of models with all nested relations into a JSON serialized [`QByteArray`](https://doc.qt.io/qt-6/qbytearray.html). +The `toJson` method converts the collection of models with all nested relations into a JSON serialized [`QByteArray`](https://doc.qt.io/qt/qbytearray.html). It returns an empty array for empty `many` type relations and `null` for empty `one` type relations. :::info -The `toJson` method accepts the [`QJsonDocument::JsonFormat`](https://doc.qt.io/qt-6/qjsondocument.html#JsonFormat-enum), possible values are `QJsonDocument::Indented` or `QJsonDocument::Compact`. +The `toJson` method accepts the [`QJsonDocument::JsonFormat`](https://doc.qt.io/qt/qjsondocument.html#JsonFormat-enum), possible values are `QJsonDocument::Indented` or `QJsonDocument::Compact`. ::: #### `toJsonArray()` {#method-tojsonarray} -The `toJsonArray` method converts the collection of models with all nested relations into a [`QJsonArray`](https://doc.qt.io/qt-6/qjsonarray.html). +The `toJsonArray` method converts the collection of models with all nested relations into a [`QJsonArray`](https://doc.qt.io/qt/qjsonarray.html). #### `toJsonDocument()` {#method-tojsondocument} -The `toJsonDocument` method converts the collection of models with all nested relations into a [`QJsonDocument`](https://doc.qt.io/qt-6/qjsondocument.html). +The `toJsonDocument` method converts the collection of models with all nested relations into a [`QJsonDocument`](https://doc.qt.io/qt/qjsondocument.html). #### `toMap()` {#method-tomap} @@ -1012,7 +1012,7 @@ The `value` method also accepts the second `defaultValue` argument, which will b // 0 -You can also call all `value` overloads provided by the [`QList::value`](https://doc.qt.io/qt-6/qlist.html#value). +You can also call all `value` overloads provided by the [`QList::value`](https://doc.qt.io/qt/qlist.html#value). #### `where()` {#method-where} diff --git a/docs/tinyorm/serialization.mdx b/docs/tinyorm/serialization.mdx index 644fcc749..730e77a4a 100644 --- a/docs/tinyorm/serialization.mdx +++ b/docs/tinyorm/serialization.mdx @@ -51,7 +51,7 @@ You may also convert entire [collections](tinyorm/collections.mdx) of models to ### Serializing To JSON -To convert a model to JSON, you should use the `toJson` method. Like `toVector` or `toMap`, the `toJson` method is recursive, so all attributes and relations will be converted to JSON. You may also specify any JSON encoding options that are supported by [QJsonDocument::toJson](https://doc.qt.io/qt-6/qjsondocument.html#toJson): +To convert a model to JSON, you should use the `toJson` method. Like `toVector` or `toMap`, the `toJson` method is recursive, so all attributes and relations will be converted to JSON. You may also specify any JSON encoding options that are supported by [QJsonDocument::toJson](https://doc.qt.io/qt/qjsondocument.html#toJson): using Models::User; @@ -68,7 +68,7 @@ You may also convert entire [collections](tinyorm/collections.mdx) of models to return users.toJson(); -You can also convert models to the [`QJsonObject`](https://doc.qt.io/qt-6/qjsonobject.html) and [`QJsonDocument`](https://doc.qt.io/qt-6/qjsondocument.html) using the `toJsonArray` and `toJsonDocument` methods and collection of models to [`QJsonArray`](https://doc.qt.io/qt-6/qjsonarray.html) and [`QJsonDocument`](https://doc.qt.io/qt-6/qjsondocument.html) using the [`toJsonArray`](tinyorm/collections.mdx#method-tojsonarray) and [`toJsonDocument`](tinyorm/collections.mdx#method-tojsondocument) methods. +You can also convert models to the [`QJsonObject`](https://doc.qt.io/qt/qjsonobject.html) and [`QJsonDocument`](https://doc.qt.io/qt/qjsondocument.html) using the `toJsonArray` and `toJsonDocument` methods and collection of models to [`QJsonArray`](https://doc.qt.io/qt/qjsonarray.html) and [`QJsonDocument`](https://doc.qt.io/qt/qjsondocument.html) using the [`toJsonArray`](tinyorm/collections.mdx#method-tojsonarray) and [`toJsonDocument`](tinyorm/collections.mdx#method-tojsondocument) methods. #### Relationships