@ElementDependent and cascade-delete

2007-04-18 Thread roger.keays
Hi there, I have a list which is marked @ElementDependent and also CascadeType.ALL. Adding and removing items from the list works fine, and those elements are deleted from the database. When I try to delete the owning entity though, I get the exception below. I can delete the entity okay if I

another shared classloader problem

2007-04-16 Thread roger.keays
Hi all, I've come across another defect since moving openjpa to tomcat's shared/lib shared classloader. Unfortunately, try as I might, I can't reliably reproduce this one, so I'm posting the problem here in the hope that somebody might be able to offer some suggestions. The problem is that one

RE: another shared classloader problem

2007-04-16 Thread roger.keays
-Original Message- From: roger.keays [mailto:[EMAIL PROTECTED] Sent: Monday, April 16, 2007 5:27 PM To: open-jpa-dev@incubator.apache.org Subject: another shared classloader problem Hi all, I've come across another defect since moving openjpa to tomcat's shared/lib shared

RE: another shared classloader problem

2007-04-16 Thread roger.keays
be another use case for names in XML files. To fix my problem, I've just and renamed one of the classes, although I suspect there is (or was, in 0.9.6) a bug in there somewhere. Thanks for the ideas, Roger -Patrick -Original Message- From: roger.keays [mailto:[EMAIL PROTECTED] Sent

Re: Shared classloader and subclasses

2007-03-24 Thread roger.keays
Abe White wrote: I see. Here's a proposal: in the MetaDataRepository's implementation of the RegisterClassListener interface, the repository only registers the given class if either the user has not specified a persistent types list (which we allow and in which case we attempt to lazily

Re: Shared classloader and subclasses

2007-03-21 Thread roger.keays
Abe White wrote: In the case above, another webapp has loaded the forums module, causing this webapp to look for the mappings in that module even though they aren't available. I had difficulty trying to figure out how to restrict which subclasses are 'seen'. Ideally I think it'd

Re: Shared classloader and subclasses

2007-03-20 Thread roger.keays
(); +if (_metas.containsKey(c) _metas.get(c) != null) { +result.add(c); +} +} +return result; } roger.keays wrote: Hi there, I'm trying to move my openjpa libs from WEB-INF/lib to Tomcat's shared/lib, but it seems I have a border case which makes

Re: Shared classloader and subclasses

2007-03-20 Thread roger.keays
Abe White wrote: AFIACT, the problem is that the openjpa.enhance.PCRegistry class uses static fields to store Meta information. When the second instance is loaded, the PCRegistry has been initialized, but doesn't contain that instance's subclasses and an exception is thrown The

Shared classloader and subclasses

2007-03-19 Thread roger.keays
Hi there, I'm trying to move my openjpa libs from WEB-INF/lib to Tomcat's shared/lib, but it seems I have a border case which makes this difficult. The situation is that each instance of the webapp loads between 5 - 10 subclasses of an abstract Entity. Which classes are loaded is specified by

JOIN in subselect problems

2007-03-13 Thread roger.keays
Is there anything wrong with the following query? UPDATE Email e SET e.totalDeliveries = e.totalDeliveries + 1 WHERE e.email IN ( SELECT m.email FROM MailingList l JOIN l.subscribers m) OpenJPA (0.9.6) parses this correctly, but can't seems to be missing the JOIN clause or some

Re: [VOTE] JOIN in subselect problems

2007-03-13 Thread roger.keays
roger.keays wrote: Hi Marc, Marc Prud wrote: The query looks valid: it sounds like a pretty clear-cut bug. Can you file a JIRA? I've filed issue 173: https://issues.apache.org/jira/browse/OPENJPA-173 As for a workaround, is there an inverse from MailingList.subscribers

Re: [VOTE] change primary key value?

2007-02-20 Thread roger.keays
Hi Craig, Thanks for the reply. Craig L Russell wrote: Is there a way to change the primary key of an entity in OpenJPA? The expection below doesn't fill me with hope... The JPA specification 2.1.4 says that the application must not change the value of a primary key, but the specific

Re: concurrent access to LRS

2006-12-13 Thread roger.keays
. On Dec 12, 2006, at 7:44 PM, roger.keays wrote: Hi Marc, Marc Prud wrote: Was a transaction committed or rolled back between the two requests? Many databases and/or JDBC drivers do not allow a result set cursor to span multiple transactions, which might be the cause of this error

concurrent access to LRS

2006-12-12 Thread roger.keays
Now that I have an em which lives for longer than one request (as per my previous thread) I have noticed some concurrency issues accessing the large result set. Since my app uses frames, there are occasions when two frames will be refreshed at the same time. When this occurs, and the both try to

Re: concurrent access to LRS

2006-12-12 Thread roger.keays
constant I can find is that it works fine if I load the frames one by one, so my best guess is it is a concurrency issue. Thanks, Roger On Dec 12, 2006, at 6:26 PM, roger.keays wrote: Now that I have an em which lives for longer than one request (as per my previous thread) I have noticed some

RE: extending the life of a LRS query

2006-12-11 Thread roger.keays
); Hope that helped. -dain On Dec 8, 2006, at 8:04 PM, roger.keays wrote: Hi, I'm trying to use OpenJPA's fetch plan extensions to have a query return a large result set. It seems to work okay, except that the LRS gets closed / detached with the EntityManager, which only

Re: Get primary key from persistent bean

2006-12-11 Thread roger.keays
Dain Sundstrom wrote: This is a major hole in the JPA spec if you ask me. +1 ! I don't use @Id either -- View this message in context: http://www.nabble.com/Get-primary-key-from-persistent-bean-tf2796004.html#a7827429 Sent from the open-jpa-dev mailing list archive at Nabble.com.

Re: Postgres known issues in doc

2006-12-05 Thread roger.keays
Jim Cullison wrote: I'm interested in using OpenJPA for a project which would use Postgres. I noticed that it says Empty string/char values are stored as NULL. in the known issues (http://incubator.apache.org/openjpa/docs/latest/manual/manual.html#dbsupport_postgresql_issues). Can anyone

mapping a ListString

2006-11-24 Thread roger.keays
Does openjpa have any extensions to map a ListString? Specifically, its a one-to-many that I'd like to map into a join table. Surprised that JPA doesn't allow for this in the spec... -- View this message in context: http://www.nabble.com/mapping-a-List%3CString%3E-tf2702450.html#a7535586 Sent

Re: how to disable toplink?

2006-11-22 Thread roger.keays
that it's impossible; it might just require some container-specific glue to make it work). On Nov 21, 2006, at 11:59 PM, roger.keays wrote: Is anybody aware of an effective way to ensure that the openjpa jars distributed in a WAR are used for the persistence implementation? I have tried

how to disable toplink?

2006-11-21 Thread roger.keays
Is anybody aware of an effective way to ensure that the openjpa jars distributed in a WAR are used for the persistence implementation? I have tried providerorg.apache.openjpa.persistence.PersistenceProviderImpl/provider in persistence.xml, and

Re: how to disable toplink?

2006-11-21 Thread roger.keays
(which isn't to say that it's impossible; it might just require some container-specific glue to make it work). On Nov 21, 2006, at 11:59 PM, roger.keays wrote: Is anybody aware of an effective way to ensure that the openjpa jars distributed in a WAR are used for the persistence

Re: Escaping reserved words in generated sql?

2006-11-16 Thread roger.keays
roger.keays wrote: {prepstmnt 17689439 INSERT INTO FB_BLOBS (contentType, filename, size) VALUES (?, ?, ?) If I execute the statement manually, quoting the size token, it is okay. Not the best example I suppose, since 'size' isn't in the default oracle DBdictionary. The following

Some portability testing results

2006-11-16 Thread roger.keays
I've just finished testing the portability of an openjpa app, and thought you all might be interested in the results. Basically, of the 9 databases I tested the only one which I couldn't get to work was hypersonic. The db's tested were: Derby 10.1, Postgres 8.1, Postgres 7.4, Mysql 5.0,

How to pass openjpa.jdbc.* to tools?

2006-11-13 Thread roger.keays
I've been trying to pass an openjpa.jdbc.MappingDefaults configuration to the mappingTool, but it is just ignored. Is this possible? I tried: java org.apache.openjpa.jdbc.meta.MappingTool -mappingDefaults=blahblah ... and mappingtool ... config mappingDefaults=blahblah /mappingtool The

Re: [VOTE] publish openjpa 0.9.6-incubating podling release

2006-11-08 Thread roger.keays
Not sure if my vote counts, but... +1 :) Marc Prud wrote: OpenJPA People- In accordance with the Incubating Releases guidelines at http:// incubator.apache.org/incubation/Incubation_Policy.html#Releases , I'd like to take a second shot at making a release and start a vote on

Re: Questions about cutting another snapshot release

2006-10-31 Thread roger.keays
Marc Prud wrote: 4. Should we just be creating a Tagged version (vs a Branch)? I believe a Tagged version can always be converted into a Branch, if support is required, so I would think a Tag should be sufficient. I think we should tag whenever we make a release. I don't know

Streaming database blobs

2006-10-30 Thread roger.keays
Can anybody tell me if it is possible to stream binary data from the database using JPA? I noticed in the spec, support for java.sql.Blob was removed in one of the revisions. OpenJPA, however, seems to have a few classes related to streaming binary data. Is it possible? Thanks, Roger -- View