Base Classes and Subclasses? - SOLVED

Aug 27, 2013 at 5:06 PM
So I'm attempting to modify my current objects to use the ORM... Most of my objects are simple and contain OneToMany relationships with the other objects in the tree. However, there are some objects that aren't as simple...

I have a Base object that has 2 different types of objects that come off of it.

Is the ORM Framework smart enough to handle this situation? Will I need to setup references? I haven't seen any mention of a OneToOne relationship. For each base object there should be only one entry in the sub classed table... not sure how to handle this situation.

Any assistance would be greatly appreciated!
Sep 12, 2013 at 12:56 AM
Okay so after looking around on the web. There are a couple of good answers on how to do this here:

At the time of posting this the top two answers have great feedback on the proper way of handling this situation.
Number 1 Answer: - Shows with SQL how you can implement an inherited object structure.
Number 2 Answer: - Talks about Martin Fowler's Patterns of Enterprise Application Architecture.

Hope this is helpful for someone else!