[appengine-java] Re: Any best practice of bulk update in JPA ?

2010-01-20 Thread Alan She
Thanks! This really a smart way for relations that often changes. But I wonder if this is the only way? What if the relation seldom change? I believe the cost of the indirection will be shown on the complexity of code and the runtime performance, if using the resolution Entity everywhere. On

Re: [appengine-java] Re: Any best practice of bulk update in JPA ?

2010-01-20 Thread John Patterson
Actually, another option is just to overwrite B so the key stays the same but the data in it changes. On 20 Jan 2010, at 15:31, Alan She wrote: Thanks! This really a smart way for relations that often changes. But I wonder if this is the only way? What if the relation seldom change? I

[appengine-java] Re: Any best practice of bulk update in JPA ?

2010-01-20 Thread Alan She
To make the requirement clear, the relation should change to an existing B. And there will be some queries on A which using B as the criteria. For example, the JPAQL would be, select a from + A.class.getName() + as a where a.bKey = :bKey So I think the second solution won't fit. For the first