Preference values - static without tables using a model with virtual attributes
        Posted  
        
            by Mike
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Mike
        
        
        
        Published on 2010-03-25T20:06:44Z
        Indexed on 
            2010/03/25
            22:53 UTC
        
        
        Read the original article
        Hit count: 390
        
Im trying to eliminate two tables from my database. The tables are message_sort_options and per_page_options. These tables basically just have 5 records which are options a user can set as their preference in a preferences table. The preferences table has columns like sort_preferences and per_page_preference which both point to a record in the other two tables containing the options. How can i set up the models with virtual attributes and fixed values for the options - eliminating table lookups every time the preferences are looked up?
© Stack Overflow or respective owner