SINGLE_TABLE inheritance: PersistentCollectionChangeWorkUnit.java: string truncating is
used to find a property name from a collectionEntry
-------------------------------------------------------------------------------------------------------------------------------------------
Key: HHH-3717
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3717
Project: Hibernate Core
Issue Type: Bug
Environment: envers 1.1.0 GA
Reporter: Michele Comitini
in PersistentCollectionChangeWorkUnit.java string truncating is used to find a property
name from a collectionEntry. It seems that if the entity is derived
with SINGLE_TABLE inheritance this truncating is fault prone.
I attached a quick patch that seems to fix the problem, but I think manipulating strings
is still not too safe to find the correct property name...
Here is an excerpt of code that happens to fail:
@Entity
@Versioned
@Table(name = "notifica")
@Inheritance(strategy=InheritanceType.SINGLE_TABLE )
@NamedQueries({
@NamedQuery(name="Notifica.all", query="from Notifica"),
})
public class Notifica extends BaseCQOPEntity implements Persistent
{
private static final long serialVersionUID = -7096378249035298397L;
@Id
@GeneratedValue
@XStreamAlias("idd")
private Long id;
@Where(clause="not(deleted=(1=1))")
@OneToMany(fetch=FetchType.EAGER)
@Cascade({})
private Set<Ruolo> ruoli = new HashSet<Ruolo>();
.
.
.
}
@Entity
@Versioned
@DiscriminatorValue(value="Pratica")
public class NotificaPratica extends NotificaImpresa
{
private static final long serialVersionUID = 1L;
.
.
.
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira