title: How can I clone an Ember Data record, including relationships?
body: <p>I've figured out that I can clone an Ember Data record and copy its Attributes, but none of the <code>belongsTo</code>/<code>hasMany</code> relationships are cloned. Can I do this somehow if I don't know what relationships would be possible, going off of the relationships that exist?</p>
  
  <p>For reference, here is what I've got that will clone an Ember Data record's attributes:</p>
  
  <pre><code>var attributeKeys = oldModel.get('constructor.attributes.keys.list');
  var newRecord = this.get('store').createRecord(oldModel.constructor.typeKey);
  newRecord.setProperties(oldModel.getProperties(attributeKeys));
  </code></pre>