Extract discriminator column

When you extract and object that use inheritance you lost the information about which object is, this PR return the discrimination column with the type of object