Polymorphic map: Polymorphic identity with custom polymorphic map

Issue #1408 resolved
Former user created an issue

Hello everyone,

this is the first of two tickets I'm going to open regarding the polymorphic map, which I consider a very neat feature of SA. I haven't found much documentation on it though, so I'm not sure whether these are features or bugs - I'd guess the latter.

The polymorphic map, as I understand it, is an alternative to the default polymorphic_identity system and f.e. suitable for setups where you would dynamically decide which class to map to.

In that case you shouldn't have to set a polymorphic identity in your polymorphic classes. This, however, seems to be necessary for inserting objects into the database, as the discriminator otherwise would be inserted as NULL.

I have attached a test to demonstrate this.

Best Regards, Thomas Wiebe

Comments (2)

  1. Log in to comment