Gavin,
I will try to make this as clear as possible. I have included my table definitions below.
My application contains a number of MODULEs. Each MODULE has a number of PAGEs associated with it. A COMPANY can have MODULEs turned on using the MODULE table. This table is essentially a many-to-many table with an extra column, "enabled". I got this mapping to work by using a component (see my previous post in this thread).
Companies are able to customize the content of the PAGEs by specifying custom html in the CUSTOMIZED_PAGES table.
I have been unable to create a mapping between COMPANY_MODULE_ASSOC and the
CUSTOMIZED_PAGES table. As you can see below, CUSTOMIZED_PAGES also has a reference back to PAGE. Can you please help me with this?
Regards,
Joshua
Table Definitions:
Code:
MODULE
--------------------
module_id (PK)
module_name
PAGE
--------------------
page_id (PK)
module_id (FK)
page_name
COMPANY_MODULE_ASSOC
--------------------
company_id (PK,FK)
module_id (PK,FK)
enabled
COMPANY
--------------------
company_id (PK)
company_name
CUSTOMIZED_PAGES
--------------------
company_id (PK,FK)
module_id (PK,FK)
page_id (PK,FK)
custom_html