collection « Version « JPA Q&A

1. Hibernate - fetch only the latest versions of elements in contained collection

I have an entity :

public class News extends TVProduction {
private int audience;
private Collection<Reportage> reportages;

public News() {

@Column(name = "audience")
public int getAudience() {

2. Version of common collections

3. Versioning where collections are changed

4. Collection issue while Hibernate upgrade to version 3

Hi I am newbie to Hibernate. I got to upgrade the Hibernate version from 2.1.6 to 3. While upgrading to HB 3, I had to replace the hbm2java task[net.sf.hibernate.tool.hbm2java.Hbm2JavaTask] with hibernatetool[org.hibernate.tool.ant.HibernateToolTask] Code:

5. Serialized collection causing auto version increment?

I'm running into something strange revolving around the usage of a serialized collection (or perhpas not so strange, if my understanding of serialized objects is not adequate...). As the mapping file below illustrates, I have a map whose values are actually serialized collections themselves. Please don't ask what the motivation of the original author of this mapping was... I don't know. ...