[Facebooker-talk] Overriding id with facebook_id???

Joseph Durden josephdurden at gmail.com
Tue Nov 11 04:36:22 EST 2008


I am new to rails, and was wondering if there would be unknown consequences
for setting the user tables primary key to being the facebook_id of a user.
I have implemented this funcionality, and everything is working fine.  All
associations etc.  What are the risks if there are any of overridding the id
with facebook_id?  Why would I not want to do this?  I did this because, it
seems easier to look up a user by their facebook id rather than their id to
get their facebook id in associated table.  Meaning if I have an association
with a user has_many comments, and the comments has a user_id column.  I
think it is easiers looking up things with facebook_ids rather than ids, as
these can get confusing.  just one less thing to worry about.

Does it matter what the order of insertions to the database for creating new
Users?

Any insight would be wonderful.

Graciously,

Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20081111/f4ee855a/attachment.html>


More information about the Facebooker-talk mailing list