We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
All the time
LinkingObjects appears to always return empty. Am I doing something wrong or are there some conditions for it to work.
The two model objects are shown below.
Note that the group.marks property returns a correct list of marks but the mark.groups property is always empty. Did I miss something
group.marks
marks
mark.groups
// Group marks and routes class Group: Object { @Persisted(primaryKey: true) var _id: ObjectId @Persisted var name: String = "New Group" @Persisted var comments: String = "" @Persisted var iconName: String = "" @Persisted var type: String = "" @Persisted var marks: List<Mark> @Persisted var routes: List<Route> convenience init(name: String, comments: String, iconName: String, type: String) { self.init() self.name = name self.comments = comments self.iconName = iconName self.type = type } } class Mark: Object { @Persisted(primaryKey: true) var _id: ObjectId @Persisted var name: String = "New Mark" @Persisted var latitude: Double = 34.0 @Persisted var longitude: Double = 20.0 @Persisted var comments: String = "" @Persisted var iconName: String = "" @Persisted var type: String = "" @Persisted var number: Int = 1 let groups = LinkingObjects(fromType: Group.self, property: "marks") convenience init(name: String, startLocation: CLLocationCoordinate2D, comments: String, iconName: String) { self.init() self.name = name self.latitude = startLocation.latitude self.longitude = startLocation.longitude self.comments = comments self.iconName = iconName } }
N/A
Not yet
10.28.6
Local Database only
No, not using encryption
macOS 12.5.1
Xcode version: 13.4.1 Dependency manager and version: SPM
The text was updated successfully, but these errors were encountered:
I was using the wrong property definitions
@persisted(originProperty: "marks") var groups: LinkingObjects @persisted(originProperty: "marks") var routes: LinkingObjects
Sorry, something went wrong.
Can you paste the full code?
No branches or pull requests
How frequently does the bug occur?
All the time
Description
LinkingObjects appears to always return empty. Am I doing something wrong or are there some conditions for it to work.
The two model objects are shown below.
Note that the
group.marks
property returns a correct list ofmarks
but themark.groups
property is always empty. Did I miss somethingStacktrace & log output
Can you reproduce the bug?
Not yet
Reproduction Steps
N/A
Version
10.28.6
What SDK flavour are you using?
Local Database only
Are you using encryption?
No, not using encryption
Platform OS and version(s)
macOS 12.5.1
Build environment
Xcode version: 13.4.1
Dependency manager and version: SPM
The text was updated successfully, but these errors were encountered: