Re: Duplicate Query - where none exists

2007-04-05 Thread Hans Prueller
perhaps this can help out: I just started using OpenJPA and I have ONLY A SINGLE CLASS WITHOUT ANY RELATIONS where I get this duplicate-query warning. So I can't believe that its related to that somehow... Hans Original-Nachricht Datum: Wed, 4 Apr 2007 23:42:01 -0700 Von: Ma

Re: Duplicate Query - where none exists

2007-04-05 Thread Marc Prud'hommeaux
How is the "category.categoryTypeFK" column defined in the database? An is there a corresponding "id" column in the table for the CategoryType class? Also, when there is just a single column in the join for a ManyToOne, I think you can skip setting the "referencedColumnName" attribute, s

[jira] Updated: (OPENJPA-203) Pessimistic Lock Manager not locking the rows

2007-04-05 Thread Srinivasa (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Srinivasa updated OPENJPA-203: -- Attachment: testcase.zip > Pessimistic Lock Manager not locking the rows > --

[jira] Created: (OPENJPA-203) Pessimistic Lock Manager not locking the rows

2007-04-05 Thread Srinivasa (JIRA)
Pessimistic Lock Manager not locking the rows -- Key: OPENJPA-203 URL: https://issues.apache.org/jira/browse/OPENJPA-203 Project: OpenJPA Issue Type: Bug Components: kernel Affects V

[jira] Updated: (OPENJPA-203) Pessimistic Lock Manager not locking the rows

2007-04-05 Thread Srinivasa (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Srinivasa updated OPENJPA-203: -- Attachment: NotesAndDiff.txt > Pessimistic Lock Manager not locking the rows > --

RE: Duplicate Query - where none exists

2007-04-05 Thread Phill Moran
It is actually called categoryTypeFK and is char(45) related to ID, char(45) in categoryType table. I like the less is more but I remember getting some complaints in eclipse. I'll try again -Original Message- From: Marc Prud'hommeaux [mailto:[EMAIL PROTECTED] On Behalf Of Marc Prud'hommea

Re: why not an EntityExistsException was thrown?

2007-04-05 Thread Craig L Russell
Hi Wanyna, Whenever you query for entities, the result entities are put into your persistence context. So when you then try to persist another entity with the same identity the provider finds the query result in the persistence context and throws EntityExistsException. Craig On Apr 4, 20

[jira] Commented: (OPENJPA-182) db2 update lock syntax WITH USE AND KEEP UPDATE LOCKS

2007-04-05 Thread Abe White (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486987 ] Abe White commented on OPENJPA-182: --- What is setting the isolation level this way actually doing? For anything o

[jira] Commented: (OPENJPA-182) db2 update lock syntax WITH USE AND KEEP UPDATE LOCKS

2007-04-05 Thread Craig Russell (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486997 ] Craig Russell commented on OPENJPA-182: --- Hopefully, this will be useful for applications where there are "hot"

[jira] Commented: (OPENJPA-203) Pessimistic Lock Manager not locking the rows

2007-04-05 Thread Abe White (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486999 ] Abe White commented on OPENJPA-203: --- Looks good. Although I think I'd prefer to make lockInternal() responsible f

[jira] Commented: (OPENJPA-182) db2 update lock syntax WITH USE AND KEEP UPDATE LOCKS

2007-04-05 Thread Abe White (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487000 ] Abe White commented on OPENJPA-182: --- > Hopefully, this will be useful for applications where there are "hot" table

Re: [jira] Commented: (OPENJPA-168) sql optimize n rows query hint

2007-04-05 Thread Ritika Maheshwari
It has not been documented in the OPENJPA documentation. On 4/4/07, Patrick Linskey (JIRA) <[EMAIL PROTECTED]> wrote: [ https://issues.apache.org/jira/browse/OPENJPA-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486820] Patrick Linskey commented on O

[jira] Commented: (OPENJPA-182) db2 update lock syntax WITH USE AND KEEP UPDATE LOCKS

2007-04-05 Thread Patrick Linskey (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487046 ] Patrick Linskey commented on OPENJPA-182: - > > Hopefully, this will be useful for applications where there a

Re: [jira] Updated: (OPENJPA-182) db2 update lock syntax WITH USE AND KEEP UPDATE LOCKS

2007-04-05 Thread Ritika Maheshwari
Finally, I replicated the logic in DB2Dictionary, but I noticed that sometimes the logic checked >for "serializable" and sometimes it checked for "read-uncommitted". I preserved these checks, >but was this intentional? I'm not all that clear about what the optimizations are, so just wanted >to en

RE: API or Query hints

2007-04-05 Thread Patrick Linskey
> Do we need this function in 0.9.7 or can it wait until 0.9.8? I don't have a strong opinion either way. If we decide to hold it for 0.9.8, then I think that it's important for us to either remove the current functionality, or make sure it's understood that the current API is subject to change wi

[jira] Commented: (OPENJPA-203) Pessimistic Lock Manager not locking the rows

2007-04-05 Thread Srinivasa (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487070 ] Srinivasa commented on OPENJPA-203: --- My initial approach was the same that we could move the responsibility of se

Re: Duplicate Query - where none exists

2007-04-05 Thread Marc Prud'hommeaux
Hans- I just did a query test with the examples/hellojpa/Message.java class in the latest openjpa-0.9.7-incubating-SNAPSHOT, and when I add: @NamedQueries({ @NamedQuery(name="q1", query="select x from Message x"), @NamedQuery(name="q1", query="select x from Message x") }) I get the d

RE: Duplicate Query - where none exists

2007-04-05 Thread Patrick Linskey
FWIW, I think that I've seen an incorrect duplicate query warning at some point as well. -Patrick -- Patrick Linskey BEA Systems, Inc. ___ Notice: This email message, together with any attachments, may contain information of

Re: [jira] Commented: (OPENJPA-182) db2 update lock syntax WITH USE AND KEEP UPDATE LOCKS

2007-04-05 Thread David Wisneski
Patrick, We were unaware that fetch plan properties could be set as Hints. Now that we look at the code we see this, but we did not find this when we read the OpenJPA documentation. The only hint we found in the documentation was the OracleSelectHint and so our design was based on how OracleSe

Re: Duplicate Query - where none exists

2007-04-05 Thread Marc Prud'hommeaux
Hmm. I don't see anything wrong with that mapping. How is the @OneToOne on the other side of the @ManyToOne defined (if you have one)? It might be good to see the output of the mappingtool's validate action on your classes. E.g.: java org.apache.openjpa.jdbc.meta.MappingTool -action val

[jira] Commented: (OPENJPA-203) Pessimistic Lock Manager not locking the rows

2007-04-05 Thread Abe White (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487078 ] Abe White commented on OPENJPA-203: --- If we don't want the subclasses to have to unset the lock value in case of e

RE: [jira] Commented: (OPENJPA-182) db2 update lock syntax WITH USE AND KEEP UPDATE LOCKS

2007-04-05 Thread Patrick Linskey
> We were unaware that fetch plan properties could be set as Hints. Now > that we look at the code we see this, but we did not find this when > we read the OpenJPA documentation. Yeah, it seems like we should probably do some documentation of some of these newer configuration options. > The on

[jira] Commented: (OPENJPA-182) db2 update lock syntax WITH USE AND KEEP UPDATE LOCKS

2007-04-05 Thread Craig Russell (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487082 ] Craig Russell commented on OPENJPA-182: --- I know that Oracle allows you to add a FOR UPDATE clause to a query,

[jira] Commented: (OPENJPA-182) db2 update lock syntax WITH USE AND KEEP UPDATE LOCKS

2007-04-05 Thread Abe White (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487085 ] Abe White commented on OPENJPA-182: --- > I know that Oracle allows you to add a FOR UPDATE clause to a query, and

[jira] Commented: (OPENJPA-182) db2 update lock syntax WITH USE AND KEEP UPDATE LOCKS

2007-04-05 Thread Patrick Linskey (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487086 ] Patrick Linskey commented on OPENJPA-182: - > > I know that Oracle allows you to add a FOR UPDATE clause > >

[jira] Created: (OPENJPA-204) Nesting of Emebedded in Embeddable element

2007-04-05 Thread sharath.h (JIRA)
Nesting of Emebedded in Embeddable element -- Key: OPENJPA-204 URL: https://issues.apache.org/jira/browse/OPENJPA-204 Project: OpenJPA Issue Type: Bug Components: jpa Affects Versions: 0.

[jira] Resolved: (OPENJPA-204) Nesting of Emebedded in Embeddable element

2007-04-05 Thread Patrick Linskey (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-204?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Linskey resolved OPENJPA-204. - Resolution: Won't Fix This is a limitation of the JPA spec. From section 9.1.34: Only

Re: [jira] Commented: (OPENJPA-182) db2 update lock syntax WITH USE AND KEEP UPDATE LOCKS

2007-04-05 Thread Ritika Maheshwari
Informix has the following SET TRANSACTION Use the SET TRANSACTION statement to define the isolation level and to specify whether the access mode of a transaction is read-only or read-write. Syntax [

RE: [jira] Commented: (OPENJPA-182) db2 update lock syntax WITH USE AND KEEP UPDATE LOCKS

2007-04-05 Thread Patrick Linskey
But both of those settings are per-transaction things, not per-query things. The DB2 isolation level syntax differs in that it is part of the SQL statement issued, rather than a separate configuration for the transaction-wide isolation level. Theoretically, the JDBC transaction-level isolation lev

annotations / tags in JIRA?

2007-04-05 Thread Patrick Linskey
Hi, Is it possible to annotate issues in JIRA with some sort of structured or semi-structured tag? I'd like to be able to mark OPENJPA-204 so that we can come back to it later when working on the next JPA specification version. I guess I could clone the issue and either make a new issue type or a

Re: annotations / tags in JIRA?

2007-04-05 Thread Marc Prud'hommeaux
Patrick- I don't know about adding keywords or anything like that, but you could always create a new "JPA2 issues" JIRA issue, and then "link" the issues you want to follow-up to it. There are a variety of link types ... you could use the "is related to" link. On Apr 5, 2007, at 1:31 PM

[jira] Created: (OPENJPA-205) JPA2 Follow-Up

2007-04-05 Thread Patrick Linskey (JIRA)
JPA2 Follow-Up -- Key: OPENJPA-205 URL: https://issues.apache.org/jira/browse/OPENJPA-205 Project: OpenJPA Issue Type: Improvement Components: jpa Reporter: Patrick Linskey This is an umbrella issue for al

Re: Using query hints for mapping extensions in orm.xml

2007-04-05 Thread Russell Parry
Has there been any progress on this issue? I just came across a case today where I'd like this functionality and some searching turned up this thread. I don't see anything on this subject that is more recent than the email below, but I'm not sure that I'm not just looking in the wrong pla

[jira] Commented: (OPENJPA-182) db2 update lock syntax WITH USE AND KEEP UPDATE LOCKS

2007-04-05 Thread Michael Dick (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487098 ] Michael Dick commented on OPENJPA-182: -- I have no practical experience with Sybase, but I did find this in thei

Re: [jira] Commented: (OPENJPA-182) db2 update lock syntax WITH USE AND KEEP UPDATE LOCKS

2007-04-05 Thread Ritika Maheshwari
I think I mentioned the wrong place but in SQLServer the isolation level can be specified as a table hint. The Table hint specifies that the query optimizer use a table scan, one or more indexes, or a locking method with this table or view and for this SELECT, INSERT, UPDATE, or DELETE statement.

[jira] Commented: (OPENJPA-182) db2 update lock syntax WITH USE AND KEEP UPDATE LOCKS

2007-04-05 Thread Patrick Linskey (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487099 ] Patrick Linskey commented on OPENJPA-182: - Between Ritika's SQLServer email on the dev list and Mike's Sybas

[jira] Updated: (OPENJPA-182) db2 update lock syntax WITH USE AND KEEP UPDATE LOCKS

2007-04-05 Thread Ritika Maheshwari (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ritika Maheshwari updated OPENJPA-182: -- Attachment: openjpa182TestCase.jar Here is a jar containing the 2 entities on whcih I

RE: [jira] Commented: (OPENJPA-182) db2 update lock syntax WITH USE AND KEEP UPDATE LOCKS

2007-04-05 Thread Patrick Linskey
> Why don't you integrate your patch and then we will rerun our tests to > make sure the function works as we had originally intended. I just did this in r525997. I also added a couple of test cases. TestSelectForUpdateOverride asserts that the DBDictionary is called with the appropriate forUpdate

Re: Query returning 2 entities w/1-1 relationship gets either openjpa.persistence.ArgumentException: Address with the same id already exists in the L1 cache. or returns [Address, Address] instead of [

2007-04-05 Thread Marc Prud'hommeaux
George- I'm not sure the exact problem (your model looks OK to me at first glance), but FTR, I just tried a simple test with a query that returns "ob, ob.someOneToOne", and it returned the expected values (in this case, a org.apache.openjpa.persistence.models.company.basic.Customer and

Re: why not an EntityExistsException was thrown?

2007-04-05 Thread wanyna
Surely you are right. The object to persist is just in the result of query. I'v made a mistake in my test case 2, I did not notice some relations. Thanks. Craig L Russell wrote: > > Hi Wanyna, > > Whenever you query for entities, the result entities are put into > your persistence context.