Topic: One model, different tables
Hello,
this may be somewhat unconventional, but I just want to know if it is possible anyway.
So here is the deal.
There will be a database with different tables concerning products.
My product has to be like:
Product(Itemkey, Description, Class, Currency, Price)
So my product model will be like
Itemkey -> database.products.id
Description -> database.products.descr
Class -> database.products.class
Currency -> database.productfinance.currency
Price -> database.productfinane.currencySo you see that I get my data for this product from different tables. I know I could do something like a has_one association, but I don't want to do like 'product.finance.price'. I would rather like product.price without having different models for it.
Greets!