Now dynamicForeignKeys transfer from Doctrine.
I decided to use a method similar to fields() for transfering the dynamicForeignKeys from Doctrine to the DAO objects. Really this should be using the Doctrine @DiscriminatorColumn annotations, but that doesn't include the refKey information for CRM_Core_Reference_Basic. Since the goal here is to keep the DAO objects returning exactly the same stuff, this was the easy way to do that. As we start to implement the mapped sub classes for these kinds of relationships in Doctrine, maybe we can change how this works as well.