I've been playing around with Beta9 from SVN and noticed that the defaulting for DiscriminatorValue has changed. I'm not sure if this is a bug or a change to be spec compliant? Thre is a note in the code about being "spec compliant"
If its a change to be spec compliant, the documentation needs to be changed:
Quote:
The default name of the discriminator column is TYPE, and (for Hibernate) the default discriminator value is the fully qualified class name.
-
http://www.hibernate.org/hib_docs/annot ... le/#d0e775
Looks like change in bindEntity():
From:
Code:
...
if ( StringHelper.isEmpty( discriminatorValue ) ) {
persistentClass.setDiscriminatorValue( persistentClass.getEntityName() );
}
...
To:Code:
...
bindDiscriminatorValue();
...
calls intoCode:
public void bindDiscriminatorValue() {
if ( StringHelper.isEmpty( discriminatorValue ) ) {
...
persistentClass.setDiscriminatorValue( name ); //Spec compliant
...
}
If the behavior is to be consistent, I'd think you'd want:
Code:
persistentClass.setDiscriminatorValue( persistentClass.getEntityName() )
because "name" is the unqualified name of the class. If this is spec compliant, an FAQ is probably in order.