Hello !
Is there any way to access fields marked with lazy fetching for detached
entities.
Im having some code like
@Entity
@Table(schema = "public", name = "users")
public class UsersEntity {
private Integer userid;
private List orders;
@OneToMany(cascade = CascadeT
Hi,
Lazy loading is not available for detached entities -- by definition,
they are no longer associated with the database.
You can, however, control whether OpenJPA returns null or throws an
exception when an unloaded field is accessed.
If you want to be able to lazily access a field after a tra
Hi,
i am also working in a highly detached environment because of auto-
detachment when giving data to a different layer (questionable
approach i know, but i dont need to inject persistenceManagers
everywhere then). So i also have this "lazy loading" problem. I
circumvent this kind of issu
Hi,
i am also working in a highly detached environment because of auto-
detachment when giving data to a different layer (questionable
approach i know, but i dont need to inject persistenceManagers
everywhere then). So i also have this "lazy loading" problem. I
circumvent this kind of issue by us
to support lazy load base on your code. Just change the order. Load the object
before you close em(this is the context needed for lazy load).
EntityManagerFactory emf = Persistence.createEntityManagerFactory("pu1");
EntityManager em = emf.createEntityManager();
OrdersEntity order = em.find(Orders
This is of course the manual way but fetch-groups are smarter in my
oppinion But i am using Kodo and it might be that fetch groups
are not supported in openJPA but i think it is
--
regards
Marc Logemann
[blog] http://www.logemann.org
[busn] http://www.logentis.de
Am 11.09.2007 um 11
11.09.07 в 12:17 Gene Wu в своём письме писал(а):
to support lazy load base on your code. Just change the order. Load the
object before you close em(this is the context needed for lazy load).
EntityManagerFactory emf = Persistence.createEntityManagerFactory("pu1");
EntityManager em = emf.crea
This is of course the manual way but fetch-groups are smarter in my
oppinion But i am using Kodo and it might be that fetch groups
are not supported in openJPA but i think it is
Yes fetch groups are suppored in OpenJPA. So can u give some basic use
case for using fetch groups ?
--
Be
Hi,
Lazy loading is not available for detached entities -- by definition,
they are no longer associated with the database.
You can, however, control whether OpenJPA returns null or throws an
exception when an unloaded field is accessed.
If you want to be able to lazily access a field after a tr
Hi, finally I could run my example using Java 6 with no problems, but,
at runtime I get this message:
test_jpa INFO [main] openjpa.Enhance - Creating subclass for
"[class test.Person, class test.Sex]". This means that your
application will be less efficient and will consume more memory than
it
> The idea is that Toplink JPA supports that feature. OpenJPA - no.
> Maybe this can be done as some configurable behaviour ?
They do, but really, all that they are doing is hiding the open EM. In
other words, the objects are not actually really detached yet.
What type of application are you buil
Hi, finally I could run my example using Java 6 with no problems, but,
at runtime I get this message:
test_jpa INFO [main] openjpa.Enhance - Creating subclass for
"[class test.Person, class test.Sex]". This means that your
application will be less efficient and will consume more memory than
On 9/11/07, Evgeny Shepelyuk <[EMAIL PROTECTED]> wrote:
>
> This should help you to understand :)
>
> http://openjpa.apache.org/builds/1.0.0/apache-openjpa-1.0.0/docs/manual/ref_guide_pc_enhance.html
>
> --
> Best Regards
> Evgeny K. Shepelyuk
>
OK, thank's a lot. I have been searching tod
Actually, you should be able to call
Persistence.createEntityManagerFactory("foo", map), where "foo" is the
name of your persistence unit in a META-INF/persistence.xml file.
-Patrick
On 9/10/07, Gene Wu <[EMAIL PROTECTED]> wrote:
> Yes, I think so. and you have to use OpenJPA specified APIs inste
Hi Evgeny,
The JPA spec is clear on the concept of a detached instance: the
instance can be used without access to the underlying database or the
persistence context whence it came. The instance can be serialized
and used in a different tier entirely. The instance can be used in a
complet
I'm new to using JPA, so I might be misinterpreting how the detached object
concept should work. The problem I am having is integrating JPA into a
service based system. I have an entity A that I would like to share
between many different entities (B). There will be time when more than one
req
Does anyone have an example of using the enhancer in a NB's ant task. I
can't get the one that the docs show to work. I'm not sure what I'm
doing wrong. Keeps saying:
org.apache.openjpa.util.MetaDataException: MetaDataFactory could not be
configured (conf.newMetaDataFactoryInstance() returne
Netbeans just've added some support for OpenJPA:
http://www.netbeans.org/issues/show_bug.cgi?id=99940. Feel free to try and let
them know what needs to be improved.
Regards,
-marina
Mauricio Salatino wrote:
Hi there! someone have a tutorial to use OpenJPA with Netbeans??
if someone have the s
thanks a lot! i'll check it out!
On 9/11/07, Marina Vatkina <[EMAIL PROTECTED]> wrote:
> Netbeans just've added some support for OpenJPA:
> http://www.netbeans.org/issues/show_bug.cgi?id=99940. Feel free to try and let
> them know what needs to be improved.
>
> Regards,
> -marina
>
> Mauricio Sala
I'm trying to upgrade the Roller 4.0 code base from OpenJPA 0.9.7 to
OpenJPA 1.0 but I'm running into a blocking issue.
The task that we use to enhance our POJOs is locking up
during the build process. There are no error messages or stack traces,
but the CPU goes to about 98% (on my core duo Mac
My ant script looks like:
21 matches
Mail list logo