openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pawel Veselov <pawel.vese...@gmail.com>
Subject Re: Lazy many-to-many properties don't load on demand? (2.1.1)
Date Wed, 28 Dec 2011 04:31:52 GMT
Hi Rick.

On Tue, Dec 27, 2011 at 1:35 PM, Rick Curtis <curtisr7@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 xmlns="http://java.sun.com/xml/ns/persistence" version="2.0">

    <persistence-unit name="Snap">

<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
        <non-jta-data-source>snap_db_jpa</non-jta-data-source>
        <class>xxx.E_App</class>
        <class>xxx.E_AppDevMap</class>
        <class>xxx.E_AppDevMapId</class>
        <class>xxx.E_Device</class>
        <class>xxx.E_Category</class>
        <class>xxx.E_Tag</class>

        <properties>
            <property name="openjpa.Log" value="File=/tmp/jpa.log,
SQL=TRACE"/>
        </properties>

    </persistence-unit>


</persistence>

Thank you,
  Pawel.



> On Dec 27, 2011 1:37 PM, "Pawel Veselov" <pawel.veselov@gmail.com> wrote:
>
> > Hi.
> >
> > On Tue, Dec 27, 2011 at 8:42 AM, Pinaki Poddar <ppoddar@apache.org>
> wrote:
> >
> > > > @ManyToMany(fetch = FetchType.LAZY, mappedBy = "categories")
> > > > public Collection<E_App> apps;
> > >
> > > change 'public' to 'private'
> > >
> >
> > I will try this tonight. Any reason why? I typically access the fields
> > directly, without getters. Would that not work for any other fields
> loaded
> > lazy as well? The only other ones I have declared LAZY are LOBs.
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message