openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From plins...@gmail.com
Subject Re: cant modify result list running with enhance
Date Mon, 03 Dec 2007 23:10:19 GMT
Hi,

I guess I don't totally understand the use case. Why do you want to
add a record to the result list? Semantically, the result list is the
list of all instances that match the query; adding an instance to the
query result list seems like it erodes this semantic meaning.

I am not surprised that there might be differences in behavior in
different pathways, but you should not rely on these differences being
stable, as the behavior of mutating a result list is undefined in the
JPA spec.

-Patrick

On 11/30/07, Sebastian Souza <ssouza@adinet.com.uy> wrote:
>
> This is the example
>
> Collection  MyCollection = query.getResultList ();
> MyCollection.add (a);
>
> Nothing happens when enhanced is on. the element a is not added to the
> collection
>
> or if i do
> MyCollection = new ArrayList  ();
> if query.getResultList () is null, MyCollection is null.
>
> thanks
>
>
> Patrick Linskey-2 wrote:
> >
> > Hi,
> >
> > What do you mean by this?Are you saying that you can't insert or
> > delete records in the list, or that you can't modify entries in the
> > list? I would expect the former regardless of using the enhancer.
> >
> > -Patrick
> >
> > On 11/29/07, Sebastian Souza <ssouza@adinet.com.uy> wrote:
> >>
> >> I cant modify any result query list when i run my app with openjpa
> >> enhance,
> >> any suggestion?
> >>
> >> if i dont run with enhance everything its ok
> >>
> >> i run with
> >>
> -javaagent:C:\lib\apache-openjpa-1.0.0\openjpa-1.0.0.jar=addDefaultConstructor=false
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/cant-modify-result-list-running-with-enhance-tf4901170.html#a14039249
> >> Sent from the OpenJPA Users mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Patrick Linskey
> > 202 669 5907
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/cant-modify-result-list-running-with-enhance-tf4901170.html#a14063325
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
>


-- 
Patrick Linskey
202 669 5907

Mime
View raw message