Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(DOCSP-27197): Rename 'task' to 'item' in RQL examples #2646

Merged
merged 3 commits into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/dart/test/task_project_models_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ part 'task_project_models_test.g.dart'; // :remove:
// :uncomment-end:

@RealmModel()
class _Task {
class _Item {
@MapTo("_id")
@PrimaryKey()
late ObjectId id;
Expand All @@ -27,7 +27,7 @@ class _Project {
late ObjectId id;

late String name;
late List<_Task> tasks;
late List<_Item> items;
int? quota;
}
// :snippet-end:
Expand Down
3 changes: 2 additions & 1 deletion examples/dotnet/Examples/RqlSchemaExamples.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ namespace Examples.RqlSchemaExamples
// "terms": {
// "RqlTask": "Item",
// "RqlProject": "Project",
// "RqlTasks": "Items"}
// "RqlTasks": "Items",
// "RqlItems": "Items"}
// }
public class RqlTask : RealmObject
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.mongodb.realm.realmkmmapp

import io.realm.kotlin.types.RealmList
import org.mongodb.kbson.ObjectId
import io.realm.kotlin.types.RealmObject
import io.realm.kotlin.types.annotations.PrimaryKey
import org.mongodb.kbson.ObjectId

class RQLTest: RealmTest() {
// :snippet-start: rql-schema-example
class Task(): RealmObject {
class Item(): RealmObject {
@PrimaryKey
var _id: ObjectId = ObjectId()
lateinit var name: String
Expand All @@ -21,7 +21,7 @@ class RQLTest: RealmTest() {
@PrimaryKey
var _id: ObjectId = ObjectId()
lateinit var name: String
lateinit var tasks: RealmList<Task>
lateinit var items: RealmList<Item>
var quota: Int? = null
}
// :snippet-end:
Expand Down
Loading