Originally created by @H2CO3 on GitHub (Dec 31, 2020).
Hi, and thanks for making CoreStore!
The documentation says:
All relationships are required to have an "inverse" relationship.
However, I was able to create a schema where some of the relationships do not have inverses, and this did not result in any compiler or runtime errors. What's the deal?
Originally created by @H2CO3 on GitHub (Dec 31, 2020).
Hi, and thanks for making CoreStore!
The documentation says:
> All relationships are required to have an "inverse" relationship.
However, I was able to create a schema where some of the relationships do not have inverses, and this did not result in any compiler or runtime errors. What's the deal?
adam
added the question label 2025-12-29 15:29:49 +01:00
The runtime assertions will run when the Schema is passed to the DataStack initiaizer. Were you actually able to use your objects?
@JohnEstropia commented on GitHub (Dec 31, 2020):
The runtime assertions will run when the Schema is passed to the DataStack initiaizer. Were you actually able to use your objects?
Yes, I was able to fill the DataStack with related objects, and I was able to use fetchAll to retrieve objects along with their children. I even made sure that no lazy loading is happening (I printed some leaf properties in order to trigger faulting).
@H2CO3 commented on GitHub (Jan 2, 2021):
Yes, I was able to fill the `DataStack` with related objects, and I was able to use `fetchAll` to retrieve objects along with their children. I even made sure that no lazy loading is happening (I printed some leaf properties in order to trigger faulting).
@H2CO3 I just checked and the assertions are there. Are you running on -O optimized builds? Assertions don't run on release builds. Other than that you may be implementing your own CoreStoreLogger and missed implementing the CoreStoreLogger.assert(...) method.
@JohnEstropia commented on GitHub (Jan 3, 2021):
@H2CO3 I just checked and the assertions are there. Are you running on `-O` optimized builds? Assertions don't run on release builds. Other than that you may be implementing your own `CoreStoreLogger` and missed implementing the `CoreStoreLogger.assert(...)` method.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @H2CO3 on GitHub (Dec 31, 2020).
Hi, and thanks for making CoreStore!
The documentation says:
However, I was able to create a schema where some of the relationships do not have inverses, and this did not result in any compiler or runtime errors. What's the deal?
@JohnEstropia commented on GitHub (Dec 31, 2020):
The runtime assertions will run when the Schema is passed to the DataStack initiaizer. Were you actually able to use your objects?
@H2CO3 commented on GitHub (Jan 2, 2021):
Yes, I was able to fill the
DataStackwith related objects, and I was able to usefetchAllto retrieve objects along with their children. I even made sure that no lazy loading is happening (I printed some leaf properties in order to trigger faulting).@JohnEstropia commented on GitHub (Jan 3, 2021):
@H2CO3 I just checked and the assertions are there. Are you running on
-Ooptimized builds? Assertions don't run on release builds. Other than that you may be implementing your ownCoreStoreLoggerand missed implementing theCoreStoreLogger.assert(...)method.@H2CO3 commented on GitHub (Jan 3, 2021):
Alright, I was indeed running an optimized build. That's it, thanks!