sutajio/related — pull request #15 by plukevdh (2013-10-08 14:54:23+00:00)
Title: Inconsistent object deserialization

Using two different methods to query for an object returns slightly different reinstantiations of a record:

```
2.0.0 :002 > cam.outgoing(:changesets).options(model: TFSGraph::Changeset).nodes.to_a.first
=> #"...", "committer"=>"...", "created"=>2013-09-20 14:07:49 -0400, "branch"=>"...", "tags"=>"[]", "parent"=>0, "merge_parent"=>0, "created_at"=>"2013-10-07T21:04:02Z", "updated_at"=>"2013-10-07T21:04:02Z"}, @_internal_id="nhAgogz8xw1lpBG5hNqBWQ", @id="213">

2.0.0 :003 > TFSGraph::Changeset.find(213)
=> #"...", "committer"=>"...", "created"=>2013-09-20 14:07:49 -0400, "branch"=>"...", "tags"=>"[]", "parent"=>0, "merge_parent"=>0, "created_at"=>"2013-10-07T21:04:02Z", "updated_at"=>"2013-10-07T21:04:02Z"}, @_internal_id="sDOjrqDq8nBQMEeJyg5uSA", @id=213>
```

Note the id, parent and merge parent are all strings using the `#find_many` method while `#find_one` deserializes properly. The model definition is as follows:

```ruby
module TFSGraph
class Changeset < Entity

property :comment, String
property :committer, String
property :created, DateTime
property :id, Integer
property :branch, String
property :tags, Array
property :parent, Integer
property :merge_parent, Integer
```