Hi Ravi,
I don't get this issue the first time I persist the UserProfile, only
subsequent times I call merge. I added the logging as you suggested and the
result is puzzling. I have a value changed listener on my jsf page, and it
is this is the code that calls the find method. Here is what my
Hello,
I use OpenJPA in a distributed J2EE Environment. I implemented a Session Bean,
which lazy creates EntityManager and EntityManager Factory:
private EntityManager getEm() {
if (this.em == null) {
this.em = this.getEmf().createEntityManager();
}
Hello,
I am using OpenJPA in a client/server environment.
I need to persist, find or query an object, update it and remove it.
How can I do this? As explained in OpenJPA's Manual Part 2, Chapter 8.2, I
tried to merge the object bevor removing it. But this doesn work.
This is my example:
Hi,
If I use the following request SELECT a FROM A a, I got a ListA
witch is perfectly fine.
If I use SELECT a.attribute1, a.attribute2 FROM A a, I got a
ListObject[] where each List element is an array of 2 values for
attribute1 and attribute2.
How can I have a ListA where only
merge() returns the updated or 'merged' instance.
So please try this and see if that works...
public void remove(Object entity) {
try {
EntityManager em = this.getEm();
Object merged = em.merge(entity);
em.remove(merged);
} catch
I implemented a Session Bean,
if the bean is stateless, it will result into frequent construction of EMF .
Which good practise do you propose?
construction of EMF is 'heavy' operation. You should avoid it all cost.
Implement a mechanics where EMF is created only once during the lifetime of
an
OK, that will solve from 40 to 60% of my problem :-)
In fact, if I understood correctly, this need a specific constructor.
When request is static, it solve the problem.
But when the request is dynamic (the request's string provided at
runtime) I can't provide the corresponding constructor at
Hi,
If I use the following request SELECT a FROM A a, I got a ListA
witch is perfectly fine.
If I use SELECT a.attribute1, a.attribute2 FROM A a, I got a
ListObject[] where each List element is an array of 2 values for
attribute1 and attribute2.
How can I have a ListA where only
Hi,
If what you want is the result as an A with some number of fields
populated, you can use a fetch plan with a fetch group that calls for
just the fields that you need.
In my experience, there is not much performance difference between
fetching 1 primitive field versus 10 primitive
Pinaki,
Yes ,you're right.
Thanks!
Yu Wang
On Mon, Jul 27, 2009 at 8:32 PM, Pinaki Poddarppod...@apache.org wrote:
Hi,
Can you please change the parameter name from to something else?
The error is during parse and may have be related to the fact that from is
a reserved word in JPQL.
10 matches
Mail list logo