docs whitespaces

This commit is contained in:
silverqx
2023-05-27 09:54:25 +02:00
parent aa5b439f46
commit e40de0a58c
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -181,7 +181,8 @@ And paste the following code.
auto posts = DB::select("select * from posts");
while(posts.next())
qDebug() << posts.value("id").toULongLong() << posts.value("name").toString();
qDebug() << posts.value("id").toULongLong()
<< posts.value("name").toString();
}
## Hello world with CMake
+3 -3
View File
@@ -529,7 +529,7 @@ As you have already learned, working with many-to-many relations requires the pr
for (auto *role : user->getRelationValue<Role>("roles"))
qDebug() << role->getRelation<Pivot, Orm::One>("pivot")
->getAttribute("created_at");
->getAttribute("created_at");
Notice that each `Role` model we retrieve has automatically assigned a `pivot` relationship. This relation contains a model representing the intermediate table and it is an instance of the `Orm::Tiny::Relations::Pivot` model class.
@@ -582,7 +582,7 @@ Once the custom intermediate table relation name has been specified, you may acc
for (auto &user : users)
for (auto *podcast : user.getRelation<Podcast>("podcasts"))
qDebug() << podcast->getRelation<Pivot, Orm::One>("subscription")
->getAttribute("created_at");
->getAttribute("created_at");
### Defining Custom Intermediate Table Models
@@ -692,7 +692,7 @@ Once the custom pivot model `RoleUser` has been defined, `getRelation` or `getRe
for (auto &user : users)
for (auto *role : user.getRelation<Role>("roles"))
qDebug() << role->getRelation<RoleUser, Orm::One>("pivot")
->getAttribute("created_at");
->getAttribute("created_at");
:::caution
Custom Pivot models may not use the `SoftDeletes` base class. If you need to soft delete pivot records consider converting your pivot model to an actual TinyORM model.