Like many people, I'm dealing with an existing database that hasn't been designed very well. I am in a situation where I have 2 tables with a one-to-one mapping via a PK. When a row in one table exists, it always exists in the other table.
What I would like to do is logically tie these together into one class, as it makes more sense from the business perspective. So in this case, instead of table-per-class, I would have 2tables-per-class. Is there any way to do this? Everything I see about the one-to-one mapping type indicates that 2 classes are required.
I can see how I could create synthetic accessors in the classes to deal with the problem, but I would rather avoid that if possible. (seems a little kludgy)
Thanks,
Mug
|