Clarify documentation around "required" inverse relationships #354

Closed
opened 2025-12-29 18:26:00 +01:00 by adam · 4 comments
Owner

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 18:26:00 +01:00
adam closed this issue 2025-12-29 18:26:00 +01:00
Author
Owner

@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?

@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?
Author
Owner

@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 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).
Author
Owner

@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.

@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.
Author
Owner

@H2CO3 commented on GitHub (Jan 3, 2021):

Alright, I was indeed running an optimized build. That's it, thanks!

@H2CO3 commented on GitHub (Jan 3, 2021): Alright, I was indeed running an optimized build. That's it, thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore-JohnEstropia#354