Skip to content

Commit

Permalink
fix: core data crash with inverse attribute (#519)
Browse files Browse the repository at this point in the history
* fix: core data crash with inverse attribute (#69)

* chore: set deletetionRule as Cascade

---------

Co-authored-by: Vadim Kuznetsov <[email protected]>
Co-authored-by: Anton Yarmolenko <[email protected]>
  • Loading branch information
3 people authored Sep 30, 2024
1 parent e85e970 commit 2433b22
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="22758" systemVersion="23F79" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
<entity name="CDAssignment" representedClassName="CDAssignment" parentEntity="CDPrimaryCourse" syncable="YES" codeGenerationType="class">
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="23231" systemVersion="24A335" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
<entity name="CDAssignment" representedClassName="CDAssignment" syncable="YES" codeGenerationType="class">
<attribute name="complete" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
<attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
<attribute name="descript" optional="YES" attributeType="String"/>
<attribute name="firstComponentBlockId" optional="YES" attributeType="String"/>
<attribute name="title" optional="YES" attributeType="String"/>
<attribute name="type" optional="YES" attributeType="String"/>
<relationship name="futureAssignment" optional="YES" maxCount="1" deletionRule="Cascade" destinationEntity="CDPrimaryCourse" inverseName="futureAssignments" inverseEntity="CDPrimaryCourse"/>
<relationship name="pastAssignments" optional="YES" maxCount="1" deletionRule="Cascade" destinationEntity="CDPrimaryCourse" inverseName="pastAssignments" inverseEntity="CDPrimaryCourse"/>
<uniquenessConstraints>
<uniquenessConstraint>
<constraint value="title"/>
Expand Down Expand Up @@ -54,12 +56,12 @@
<attribute name="progressEarned" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="progressPossible" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES"/>
<attribute name="resumeTitle" optional="YES" attributeType="String"/>
<relationship name="futureAssignments" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="CDAssignment"/>
<relationship name="pastAssignments" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="CDAssignment"/>
<relationship name="futureAssignments" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="CDAssignment" inverseName="futureAssignment" inverseEntity="CDAssignment"/>
<relationship name="pastAssignments" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="CDAssignment" inverseName="pastAssignments" inverseEntity="CDAssignment"/>
<uniquenessConstraints>
<uniquenessConstraint>
<constraint value="courseID"/>
</uniquenessConstraint>
</uniquenessConstraints>
</entity>
</model>
</model>

0 comments on commit 2433b22

Please sign in to comment.