[
http://opensource.atlassian.com/projects/hibernate/browse/ANN-531?page=co...
]
Laurent Perez commented on ANN-531:
-----------------------------------
I'm not sure I understand : do changes in CollectionBinder.java rev11052 fix these
props deserialization ? Fisheye throws an error 500 on the diff, can't see the diffed
source.
I agree @Node(embed-xml=true|false) would be a full fix, another question while I'm at
it : why is embed-xml defaulting at true anyway ? It seems to cause infinite xml
generation cycle, given an association relies on a parent.
EntityMode.DOM4J does not deserialize collection entities
---------------------------------------------------------
Key: ANN-531
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-531
Project: Hibernate Annotations
Type: Bug
Components: binder
Versions: 3.2.2
Environment: PATCH ANN-517 APPLIED (see
http://opensource.atlassian.com/projects/hibernate/browse/ANN-517), revision 11026.
Reporter: Laurent Perez
The XML deserialization of an entity does not deserializes its child properties but only
its id, following sample :
Foobean are children of a Screen :
@Entity
@Table (name="foobean")
public class Foobean implements java.io.Serializable {
private String name;
private String age;
private Screen screen;
@Id
@Column(name="name")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@ManyToOne
public Screen getScreen() {
return this.screen;
}
public void setScreen(Screen screen) {
this.screen = screen;
}
@Column(name="age")
public String getAge() {
return age;
}
public void setAge(String age) {
this.age = age;
}
}
Relevant parent Screen annotations :
private Set<Foobean> fooBeans = new HashSet<Foobean>();
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER)
public Set<Foobean> getFoobeans(){
return this.fooBeans;
}
public void setFoobeans(Set<Foobean> fooBeans) {
this.fooBeans = fooBeans;
}
Association :
Foobean foobean = new Foobean();
foobean.setName("foo");
foobean.setAge("age");
foobean.setScreen(screen);
screen.getFoobeans().add(foobean);
Generated XML (the age property of Foobean is missing, i.e there is no
<name>foo</name><age>age</age>) :
<Screen>
<id>1</id>
<foobeans>
<Foobean>foo</Foobean>
</foobeans>
</Screen>
--
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