Overwriting currently loaded entity with new subclass using the same Id.

2011-04-07 Thread Todd Nine
Hi all, I have a unique issue I could use a hand with. Our model uses the following inheritance Person -> User -> Customer. When purchases a unit and becomes a customer, they need to transparently be upgrade to a Customer. In doing so, I have to copy the UUID from the user to a customer. W

@PersistenceContext is null

2011-04-07 Thread chintan4181
Hi, I am trying to access JPA entities using Stateless EJBs, Earlier i have one Stateless EJB which was injecting PersistenceContext using annotation. It is working fine. Since Stateless EJB is haveing data access code, I have introduced DAO mechanism to separate data access from EJB. For that I h

Help with Embedded objects and statemanager detachment

2011-04-07 Thread Todd Nine
Hi all, I'm having a very difficult time working with embedded entities in Cassandra. Specifically, this is the case where I'm getting very strange behavior.Em = Entity Manager. em created em begin transaction em load User entity , the embedded Address object is correct. em complete trans

RE: Oracle XMLType fetch problems

2011-04-07 Thread kostellodon
I've run into issues with handling strings whose length > 4000 chars. I know this is a documented bug that is fixed in OpenJPA 2.1, but I'm limited to the OpenJPA 1.2.1, and am trying to fit the solution into that version. I extended the base OracleDictionary, modified my persistence.xml to use

Re: Need help to understand how getDirtyObjects() works.

2011-04-07 Thread Michael Dick
Hi Chintan, What you're trying to do is (in my opinion) a gray area. You have a stateless EJB, but are expecting the EntityManager to track the state of a set of entities between method calls. If you start a transaction before calling read() and that transaction is still active when you call upda

Re: Javadoc page is out of date

2011-04-07 Thread Michael Dick
The main documentation page has the correct links, I'm not sure how the /javadoc.html page gets pulled together though. In the mean time try these links : 2.2.0-SNAPSHOT Javadoc : http://openjpa.apache.org/builds/latest/docs/javadoc/index.html 2.1.0-SN

Re: Javadoc page is out of date

2011-04-07 Thread Michael Dick
Hi Henno, Thanks for letting us know. I thought I updated that page after the release, but I must have missed it. The links should be fixed later this morning (afternoon in the Netherlands). -mike On Thu, Apr 7, 2011 at 3:43 AM, Henno Vermeulen wrote: > Hello, > > Maybe you are already aware of

Re: Documentation on setting a field strategy in XML

2011-04-07 Thread Michael Dick
Hi Jared, Currently there is no way to set an OpenJPA specific annotation via XML. We are working on fixing this, take a look at OPENJPA-1971for the details. -mike On Thu, Apr 7, 2011 at 6:12 AM, Jared Pearson wrote: > I'm trying to find infor

Re: same jpa query generates different SQLs

2011-04-07 Thread Marc Logemann
Hi, the issue is: https://issues.apache.org/jira/browse/OPENJPA-1955 Seems nobody cared so far ;-) Feel free to vote up (if this is possible). Greetings to Fabian Lange btw. Just noticed you both work for the same company. He knows me from Nokia-Siemens back then. --- regards Marc Logemann ht

Re: same jpa query generates different SQLs

2011-04-07 Thread Tobias Trelle
Marc Logemann wrote: > > created an issue for it. Thanks for your ideas to make the cache > disablement query based > Dear Marc, can you please provide a link to this issue? I'm facing the same problem with OpenJPA 2.0.1 und DB2 V9: I have a query based on two Date parameters (amongst oth

Documentation on setting a field strategy in XML

2011-04-07 Thread Jared Pearson
I'm trying to find information on setting a field strategy using XML. I understand that openjpa.jdbc.MappingDefaults defines a type to a Strategy but I need a specific field to Strategy. In annotations, you would use @Strategy on the field. Thank you. Jared

Re: OpenJPA Sequence Generation in HSQLDB broken?

2011-04-07 Thread MiƂosz Tylenda
Hi Lennart, You are using an in-memory database and "shutdown=true" in the URL. This causes the database be shut down when the last connection terminates. I guess that what's happening here is the sequence is created, then the connection terminates and when a new connection starts you are in fa

Javadoc page is out of date

2011-04-07 Thread Henno Vermeulen
Hello, Maybe you are already aware of this, but just in case... The javadoc page at http://openjpa.apache.org/javadoc.html is out of date, it shows 2.1.0-SNAPSHOT as the latest version but when I click this it opens the documentation for 2.2.0-snapshot and there is no link to the 2.1.0 release

Re: Issues with GeneratedValue and SequenceGenerator

2011-04-07 Thread realdepp
I think I got it: When I mark the getter and the setter for the id as "final", the error occurs. Without final it works fine. -- View this message in context: http://openjpa.208410.n2.nabble.com/Issues-with-GeneratedValue-and-SequenceGenerator-tp6244055p6249036.html Sent from the OpenJPA Users m