Hi,

I'm a newbie to Lift and still learning Lift by coding a pet project.

One question I have is about the Mapper.

For example, if I have two classes, say Promotion and Discount. They
are two different classes but having a one to one relationship to each
other, i.e. Each Promotion will have one Discount object and vise
versa.


If I model them in Lift by two classes and each of them extends from
LongKeyedMapper. Then each of them will be mapped to a DB table. Hence
I will have two tables created in DB.

Its it possible to setup or construct these two class such that in
code level, they will be two different classes but in DB level, they
are both mapped to a table.

For example, if Promotion have properties like name , expiry date and
Discount have properties like original price and discounted price. Can
they map to a table named PromotionDetails in DB with columns id,
name, expiry date, original_price and discounted_price ?

Thanks

Ferdinand


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

Reply via email to