I have two joined subclass reading from the same table having as a
discriminator a nullable field. I have been able to read the two entities
using a subselect like this:
<joined-subclass name="EntityA"
table="t_entity"
subselect="SELECT * FROM t_entity WHERE t_entity.discriminator is not null">
<key column="t_uid"></key>
<!-- more mapping --></joined-subclass>
<joined-subclass name="EntityB"
table="t_entity"
subselect="SELECT * FROM t_entity WHERE t_entity.discriminator is null">
<key column="t_uid"></key>
<!-- more mapping --></joined-subclass>
Everything is fine but when I try to delete one of the two entities I get a
syntax error:
NHibernate.Exceptions.GenericADOException was unhandled
HResult=-2146232832
Message=could not delete: [EntityA#27]
[SQL: DELETE FROM ( SELECT *
FROM t_entity
WHERE t_entity.discriminator is not null ) WHERE t_uid =
?]Source=NHibernate
Any better idea about how to discriminate entities from the same table by a
nullable field?
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.