Hello, I am a newbie with LLBLGen Pro and have a couple questions. I am using SQL Server 2005 and the Adapter scenario in 1.0.2005.1. With that said...
In designing a new db, I have the following schema:
** ->Object (ObjectGUID PK)
---> Person (PersonGUID PK & is also a FK to ObjectGUID)
------> Employee (EmployeeGUID PK & is also a FK to PersonGUID)**
So far so good, in that an Employee inherits from Person which inherits from Object. I am using GUIDs as PKs and the PK of Employee is infact the same value as the PK for the parent Object (or Person). This way I can have an ObjectAddress table while still being able to relate an Employee to ObjectAddress since Employee.EmployeeGUID = ObjectAddress.ObjectGUID.
But the problem is that I dont want to leave the Employee (or any object) rows visible to all users. So I want to design a view ObjectView which will restrict all object rows based on the users visibility level (ex: company level, location level, etc).
-
How can a view participate in this relation in LLBLGen Pro? i.e. Can I replace Object being the parent of this structure to ObjectView being the parent instead. Though the FK constraints are defined on tables not views.
-
If I do the above, how can I accurately fetch an Employee by fetching an ObjectView first. ObjectView will not have fields such as LastName, FirstName etc so I cant do a search on ObjectView but rather have to search on Person or Employee and then I am not restricting my results using the ObjectView restrictions.
Does all this make sense?