Lazy many-to-many properties don't load on demand? (2.1.1)

2011-12-27 Thread Pawel Veselov
Hi. I'm using 2.2.1 I have declared a ManyToMany property, with lazy fetch type (my entities are all property based). The property does not load when accessed (the collection is null). Setting it to eager loading works, but I don't want (for performance reasons) for it to always load. Is there

Re: Lazy many-to-many properties don't load on demand? (2.1.1)

2011-12-27 Thread Pinaki Poddar
@ManyToMany(fetch = FetchType.LAZY, mappedBy = categories) public CollectionE_App apps; change 'public' to 'private' - Pinaki Poddar Chair, Apache OpenJPA Project -- View this message in context:

Re: Lazy many-to-many properties don't load on demand? (2.1.1)

2011-12-27 Thread Pawel Veselov
apps; ... } Mapping in the other direction is also LAZY. Thanks, Pawel. -Ursprüngliche Nachricht- Von: Pawel Veselov [mailto:pawel.vese...@gmail.com] Gesendet: Dienstag, 27. Dezember 2011 12:03 An: users@openjpa.apache.org Betreff: Lazy many-to-many properties don't load

Re: Lazy many-to-many properties don't load on demand? (2.1.1)

2011-12-27 Thread Pawel Veselov
Hi. On Tue, Dec 27, 2011 at 8:42 AM, Pinaki Poddar ppod...@apache.org wrote: @ManyToMany(fetch = FetchType.LAZY, mappedBy = categories) public CollectionE_App apps; change 'public' to 'private' I will try this tonight. Any reason why? I typically access the fields directly, without

Re: Lazy many-to-many properties don't load on demand? (2.1.1)

2011-12-27 Thread Pinaki Poddar
The instance variables of a class must be private, protected, or package visibility independent of whether field access or property access is used. When property access is used, the property accessor methods must be public or protected. JPA 2.0 Section 2.2 - Pinaki Poddar Chair, Apache

Re: Lazy many-to-many properties don't load on demand? (2.1.1)

2011-12-27 Thread Rick Curtis
How are you enhancing your entities and can you post the contents of your persistence.xml? On Dec 27, 2011 1:37 PM, Pawel Veselov pawel.vese...@gmail.com wrote: Hi. On Tue, Dec 27, 2011 at 8:42 AM, Pinaki Poddar ppod...@apache.org wrote: @ManyToMany(fetch = FetchType.LAZY, mappedBy =

Re: Lazy many-to-many properties don't load on demand? (2.1.1)

2011-12-27 Thread Pawel Veselov
Hi Rick. On Tue, Dec 27, 2011 at 1:35 PM, Rick Curtis curti...@gmail.com wrote: How are you enhancing your entities and Enhancing is done with PCEnhancer, during build time. can you post the contents of your persistence.xml? ?xml version=1.0 encoding=UTF-8? persistence

Re: Lazy many-to-many properties don't load on demand? (2.1.1)

2011-12-27 Thread Pawel Veselov
Hi Pinaki. On Tue, Dec 27, 2011 at 1:08 PM, Pinaki Poddar ppod...@apache.org wrote: The instance variables of a class must be private, protected, or package visibility independent of whether field access or property access is used. When property access is used, the property accessor methods