README.md in ruby-xcdm-0.0.9 vs README.md in ruby-xcdm-0.0.10

- old
+ new

@@ -8,10 +8,12 @@ [![Dependency Status](https://gemnasium.com/infinitered/ruby-xcdm.png)](https://gemnasium.com/infinitered/ruby-xcdm) [![Build Status](https://travis-ci.org/infinitered/ruby-xcdm.png?branch=master)](https://travis-ci.org/infinitered/ruby-xcdm) [![Gem Version](https://badge.fury.io/rb/ruby-xcdm.png)](http://badge.fury.io/rb/ruby-xcdm) +ruby-xcdm is maintained by [Infinite Red](http://infinite.red), a web and mobile development company based in Portland, OR and San Francisco, CA. + ## Installation Add this line to your application's Gemfile: ```ruby @@ -160,9 +162,28 @@ end entity "Ego" do has_one :person end +``` + +Deletion rules can be easily set on relationships and the default rule is "Nullify": + +```ruby + entity "Discussion" do + has_many :messages, deletionRule: "Cascade" + end + + entity "Message" do + belongs_to :discusion + end + + # Example: + # Discussion.first.messages.count => 10 + # Messages.count => 10 + # Discussion.first.destroy + # cdq.save + # Messages.count => 0 ``` Core Data has no equivalent of ```:through``` in ActiveRecord, so you'll need to handle that relation yourself.