# Single Table Inheritance and modules

**URL:** <https://www.ruby-forum.com/t/single-table-inheritance-and-modules/126138>\
**Category:** Rails\
**Created:** [January 15, 2008, 7:29pm UTC](https://www.ruby-forum.com/t/single-table-inheritance-and-modules/126138 "2008-01-15T19:29:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![acarlos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d9b06d/32.png) [@acarlos](https://www.ruby-forum.com/u/acarlos)\
**Post date:** [January 15, 2008, 7:29pm UTC](https://www.ruby-forum.com/t/single-table-inheritance-and-modules/126138/1 "2008-01-15T19:29:27Z")

</div>

Hello,

I have model objects inside modules to prevent naming collisions.  
Does anyone know how to force ActiveRecord, when using STI, to use  
the module name in the type column of the database?

I’ve tried forcing AR to save the module name in the type column, but  
then when I try to retrieve the object, the sql statement includes  
“where ‘type’ = ‘class’” (without the module name) and the object  
cannot be found.

Thanks in advance,

-Anthony
