Geronimo spec API update complete

2008-11-26 Thread Jeremy Bauer
The Geronimo JPA 2.0 spec API and corresponding OpenJPA updates are complete in trunk. If you have a local trunk build you'll need to use the -U option with maven (ex. mvn -U clean install) to pick up the new snapshot of the Geronimo JPA spec jar, otherwise your build may fail. The JPA 2.0 spec AP

Geronimo spec API update in progress, may affect trunk build

2008-11-26 Thread Jeremy Bauer
The Geronimo JPA 2.0 spec API is currently being updated with the JPA 2.0 API updates defined in the latest JSR-317 draft. OpenJPA uses the Geronimo JPA 2.0 API to build OpenJPA 2.0 snapshot/trunk. Corresponding OpenJPA updates need to be made following the Geronimo update, so there will be a per

issues with closing/opening entity manager (slices)

2008-11-26 Thread Fernando Padilla
So i got unique queries working with slices (hoorah), look at the appropriate bug (maybe OPENJPA-793) for the patch. But now I hit this really nasty bug, that I can't create new entity managers after I close an old one.. even though the same code works with normal openjpa (non-slice). So the

Re: issues with unique query, using slices

2008-11-26 Thread Fernando Padilla
The simple version of the patch is here in the bug.. two line change. https://issues.apache.org/jira/browse/OPENJPA-787 I'll leave the renaming and cleaning of "UniqueResponseObjectProvider" to a later time; janitorial work.. Pinaki Poddar wrote: Good. we will wait for your patch.

Re: issues with unique query, using slices

2008-11-26 Thread Pinaki Poddar
Good. we will wait for your patch. -- View this message in context: http://n2.nabble.com/issues-with-unique-query%2C-using-slices-tp1578499p1582774.html Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: issues with unique query, using slices

2008-11-26 Thread Fernando Padilla
cool. I'm reviewing the code, and it looks simple to fix. The bug is that in DistributedStoreQuery.executeQuery, it is getting confused between isUnique and isAggregate. It needs to do some fancy aggregation work for aggregated queries ( avg, sum, count, etc ), but it doesn't need to do anyth

Re: issues with unique query, using slices

2008-11-26 Thread Pinaki Poddar
> Any hints Pinaki? The simple answer is Query execution takes different path when it is has to return a single result. Personally, I would like a query to be executed in the same way and then the facade getSingleResult() should determine whether the selected result is unique or not and return to

Re: issues with unique query, using slices

2008-11-26 Thread Fernando Padilla
Thank you. Trying to find why it's "badly broken" will be my next step. Any hints Pinaki? And I also don't remember this being mentioned in the docs.. anybody want to update the docs until this is fixed? Michael Dick wrote: Hi, I haven't searched through the JIRA issues, but this looks l

Re: Query using select max( @Version_field ) fails - why?

2008-11-26 Thread Pinaki Poddar
Hi, 1. TypeEntity class has annotated two fields namely 'id' and 'version' as @Id. That makes a composite key but no identity class has been declared. Bit surprised that no error had been flagged. 2. 'version' field is marked as both @Id and @Version. Is that intended? 3. After omiiting @

Re: Targeted Query in Slices

2008-11-26 Thread Pinaki Poddar
Hi, > I put the Slice "ONE", but when i remove the "hint" clause the result > comes for me, but i know that at > least one result have to return in this query, i don't know what i'am > doing wrong... Your question is not clear to me. 1. Please explain further 2. Examine the generated SQL.

Re: Enabling query filter extension

2008-11-26 Thread Pinaki Poddar
Hi, By the nature of the error message, my 'guess' is it got to do with ClassLoading rather than initialization. SomeEntity29 is loaded by ClassLoader C1. While the query Q that raised the exception found and resolved SomeEntity29 using ClassLoader C2. Does that ring any bell in the test envi

Re: issues with unique query, using slices

2008-11-26 Thread Michael Dick
On Wed, Nov 26, 2008 at 9:21 AM, Michael Dick <[EMAIL PROTECTED]>wrote: > Hi, > > I haven't searched through the JIRA issues, but this looks look a good > candidate. > Err nevermind. Just saw the issue you opened. > > We'll certainly consider any patches you come up with. > > -mike > > > On Tue

Re: issues with unique query, using slices

2008-11-26 Thread Michael Dick
Hi, I haven't searched through the JIRA issues, but this looks look a good candidate. We'll certainly consider any patches you come up with. -mike On Tue, Nov 25, 2008 at 9:15 PM, Fernando Padilla <[EMAIL PROTECTED]> wrote: > 1) wha? So.. wow. wow. > > 2) ok, but next issue, is that it looks

Re: Get @Id field value (FK) without loading entity (JOIN) when using FetchGroups or Lazy Loading

2008-11-26 Thread Yann Andenmatten
Hi Pinaki, Thanks for your answer, it is a way to solve our issue. I've still a question: will the OpenJPAStateManager access still work properly on detached object in every case? Pinaki Poddar wrote: > > The short answer is you need to get hold of OpenJPAStateManager for A -- > the proxy

Re: ArgumentException (Incomplete initialisation of EntityManager)

2008-11-26 Thread Yann Andenmatten
Hi Pinaki, I tried without success... It seams to me that the initialisation is done in some separate thread as the state of the entity manager evolve between the moment the problem is detected and when the error message is built. Yann -- View this message in context: http://n2.nabble.com/Arg

Re: ArgumentException (Incomplete initialisation of EntityManager)

2008-11-26 Thread Yann Andenmatten
Hi Jeremy, Yes each thread gets its own EM. All share the same EMF, but that's ok. (We tried also the openjpa.Multithreaded property without success.) Here is the test case: http://n2.nabble.com/file/n1581046/MultithreadedQueriesTest.java MultithreadedQueriesTest.java http://n2.nabble.com/file/

WG: [mojo-dev] [VOTE] align version schema of openjpa-maven-plugin with openjpa versions?

2008-11-26 Thread Mark Struberg
Sorry for the noise, but I think this may also be interesting for openjpa folks which are not on the mojo list. Comments are welcome. LieGrue, strub --- Mark Struberg <[EMAIL PROTECTED]> schrieb am Mi, 26.11.2008: > Von: Mark Struberg <[EMAIL PROTECTED]> > Betreff: [mojo-dev] [VOTE] align ver

Targeted Query in Slices

2008-11-26 Thread thiago ananias
Hello people, i'm getting problems with Slices again, now i have to bring the results of only one database, look: String db = "ONE"; String hint = "openjpa.hint.slice.Target"; Properties props = new Properties(); EntityManagerFactory factory = Persistence

Query using select max( @Version_field ) fails - why?

2008-11-26 Thread Brenckmann, Dirk
Hi. The entity causing the problem: === @Entity public class TypeEntity { @Id public ... getId(); @Id @Version public ... getVersion(); } The failing query: == pu for classes TRACE [ejbd 10] openjpa.Query - Executing query: [SELECT entity FROM

How to: GenerationType.Identity for mysql NOT NULL auto_increment @Id column

2008-11-26 Thread Brenckmann, Dirk
Hello, Database: mysql 4.1 Tablemanager: InnoDB CREATE TABLE db1.`type` ( `id` bigint(20) unsigned NOT NULL auto_increment, `name` varchar(100) NOT NULL default '', `description` varchar(100) default '', `userid` varchar(100) NOT NULL default '', `validFrom` timestamp NOT NULL default

query question

2008-11-26 Thread is_maximum
Hello I have problem with following query: select e from GeneralEntry as e where ?1 like CONCAT(e.position,'%') and CONCAT(?1,'%') not like e.position and ( (?2 = true) or (?2 = false and e.position <> '1') ) openJPA doesn't accept ?1 as a left side operand !!! and if replace them my query