I am writing a simple rails app that caches values from a web service. The web service returns a list of objects that look like this:
<objects>
<object>
<id>12345</id>
<name>obj name</name>
</object>
....
</objects>
Is it okay to use the id coming in as the id for my ActiveRecord object if I am guaranteed it is unique... or is it better practice set it as a different attribute and let ActiveRecord handle the id? I have read through the code and it looks like the create method on ActiveRecord does not generate a new id if it is already set. Am I understanding this correctly?
Thanks