LazyCollection « Map « JPA Q&A





1. Can't delete only child object when use hibernate @LazyCollection(LazyCollectionOption.FALSE) annotation    stackoverflow.com

i have read there and i use @LazyCollection(LazyCollectionOption.FALSE) for the similar reason in my Entity classes: EntityCity.java:

@ManyToOne
@JoinColumn(name="Country_Id")
private EntityCountry mcountry;

public EntityCountry getMcountry() { return mcountry; }
public void setMcountry(EntityCountry mcountry) { this.mcountry = ...

2. @Where and @LazyCollection    forum.hibernate.org

It appears that if you use @LazyCollection your @Where clause gets ignored. I have a collection mapped in an entity called User that looks like this: @OneToMany(mappedBy="user", fetch=FetchType.LAZY) @LazyCollection(LazyCollectionOption.EXTRA) @Where(clause="deleted=0 AND duplicate=0") private List properties = new ArrayList(); if I call properties.size() I get a count that includes properties where the "deleted" attribute is true. If I leave out the @LazyCollection ...

3. @LazyCollection(LazyCollectionOption.EXTRA) - FlushMode    forum.hibernate.org

Newbie Joined: Fri Apr 11, 2008 5:16 am Posts: 1 Hi all I'am currently using Core: 3.2.6.ga / EM: 3.3.2.GA Can please someone double check my suspects that EntityManager does not respect FlushMode.MANUAL or any other FlushMode when collections are annotated with @LazyCollection(LazyCollectionOption.EXTRA). I'm facing this problem with jboss seam on a Form with 8 SelectOneMenus (using entityConverter). When I save ...

4. @LazyCollection(LazyCollectionOption.EXTRA)    forum.hibernate.org

Hi all. I wanted to use the annotation @LazyCollection(LazyCollectionOption.EXTRA) in my One>ToMany and ManyToMany relations but I have founded a problem: this annotation seems doesn't work right with @Cascade(CascadeType.MERGE). I don't know why but merge propagation doesn't occur if using LazyCollectionOption.EXTRA lazy type. Any idea? is this a bug? is this reasonable? what happens? Thanks!