# Association without id in table

**URL:** <https://www.ruby-forum.com/t/association-without-id-in-table/143966>\
**Category:** Rails\
**Created:** [July 24, 2008, 7:49am UTC](https://www.ruby-forum.com/t/association-without-id-in-table/143966 "2008-07-24T07:49:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![subhadip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3d9bf3/32.png) [@subhadip](https://www.ruby-forum.com/u/subhadip)\
**Post date:** [July 24, 2008, 7:49am UTC](https://www.ruby-forum.com/t/association-without-id-in-table/143966/1 "2008-07-24T07:49:33Z")

</div>

can we use association(has\_one,has\_many,belongs\_to) without  
using id as primary key.

---

<div class="post-metadata">

**Author:** ![subhadip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3d9bf3/32.png) [@subhadip](https://www.ruby-forum.com/u/subhadip)\
**Post date:** [July 24, 2008, 10:18am UTC](https://www.ruby-forum.com/t/association-without-id-in-table/143966/2 "2008-07-24T10:18:43Z")

</div>

I’m not sure, since I never used it that way,  
but my first guess would be, that the :finder\_sql option  
would allow to get around the id column
