Chris Prather wrote:
On Wed, May 27, 2009 at 4:24 PM, Dmitri Ostapenko <dmi...@farematrix.com> wrote:
Is there a way to tell which attributes come from role? I can't think of a
good way of doing this besides from changing attributes names in some way.
Using prefix for example..
tx,
What are you trying to achieve?
-Chris
!DSPAM:2337,4a1da1e770674824671560!
I'm writing interface module for DB table (Pg) that has close
relationship with another table, but does not inherit from it as each
row in main table can have multiple rows in base table. Class I'm
writing needs to interact with both tables.
In case of pure postgres base tables, classes map to tables beautifully.
Base table has corresponding role and child table has corresponding
class. This clean mapping breaks if underlying tables don't have
inheritance.
So using a role to model lower-level table I need to be able to tell
which attributes come from class and which come from role in methods
for saving and retrieving data.
Maybe base class would be better suited for something like this?