Mads Hartmann <[email protected]> writes:

> Hello Everyone,
>
> I'm currently trying to figure out how to map objects with inheritance
> using the Mapper framework. I've got a Lab and a Scientist who inherit
> from Source.
>
> As I understand there's no direct way to do inheritance using the
> Mapper framework so I'm trying to figure out how to implement 'Single
> Table Inheritance'.
>
> Right now I'm trying to create a single trait (Source) for the values
> that they share called BaseSource and my idea is to mix it in both Lab
> and Scientist. I would then define the table name of both scientist
> and lab to be the same - I think this would work but what I'm not sure
> of is the following:
>
> - If both Scientist and Lab mixes in the IdPK trait and use the same
> table, will the id still be unique?
> - A Discovery has a source, how do i create MappedLongForeignKey to
> the table they share (lab, scientist)?
>
> I hope you'll be able to help me out :)

I can't say I follow the above :-) Do you want to share tables, code or
both? Maybe list the table structure and explain how you would like to
map it....

/Jeppe

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to