Hi,
I just found strange behavior while executing
Query q=entityManager.createNativeQuery(
"execute spTree_getSpecs_v2 @p_PARTY_ID=?1," +
" @p_GRANT=?2, @p_GROUP_ID=?3, @p_BRAND_ID=?4,
@p_VENDOR_ID=?5, " +
"@p_ORDER=?6, @p_BEGIN=?7, @p_END=?
Hi,
I have simple query with Foo and FooType are persistent classes and name is
string type:
(1)@NamedQuery(
(2)name = "Foo.findByTypeAndName",
(3)query = "SELECT e " +
(4)"FROM Foo e " +
(5)"WHERE e.fooType = :fooType " +
(6) "
Hi,
I have no idea about that "manually setting the version field in your
application".
So far, my understanding on setting of the version field is a qualified
field(Integer, Long or DateType) with annotation @Version. Is this the one
you mentioned as manually setting?
Thanks,
Gene.
On 9/18/07
The error is send afte 2,000 rows iterated when using OpenJPA + Derby
Client Driver, but it works ok when using TopLink + Derby Client Driver,
same driver same server:
[java] 45360 JPADependencias2 TRACE [main] openjpa.jdbc.SQL - [0 ms] spent
[java] 45360 JPADependencias2 TR
Ok. Thanks all. I understand the concept now.
- Original Message
From: Craig L Russell <[EMAIL PROTECTED]>
To: users@openjpa.apache.org
Sent: Monday, September 17, 2007 7:47:38 PM
Subject: Re: Flush Mode
Hi Gurkan,
JPA is designed to provide transaction isolation between
EntityManage
Positive. The DAO classes and the persistence.xml are all packaged in a
jar file. I can use these DAO classes to query the database from a a
desktop Java application which has a dependency on this jar.
The issue is when I attempt to use the same jar as an eclipse plugin and
call the query methods.
Are you sure that the jar contains the right file at META-INF/persistence.xml?
-Patrick
On 9/17/07, sudhakar <[EMAIL PROTECTED]> wrote:
> I realize this is more of an eclipse related question. But was hoping
> someone here has already tackled this.
>
> I have some DAO classes that user OpenJPA. T
I realize this is more of an eclipse related question. But was hoping
someone here has already tackled this.
I have some DAO classes that user OpenJPA. This is packaged as a jar and
I can use the jar in a regular Java application to connect and query the
database. I then created an Eclipse RCP plu
Hi,
If SessionOperations is creating a new EM, then what you're seeing is
the expected behavior -- different EMs in an SE environment will
always use different JDBC connections, and so the transactions are
isolated from each other. Assuming that your database is not using a
READ_UNCOMMITTED isolat
Hi Gurkan,
JPA is designed to provide transaction isolation between
EntityManagers. So, if two EntityManagers do not share the same
transaction, changes made in one must not be visible in the other.
In your case, the query from the second EntityManager should not be
able to see the change
Hi,
Are you manually setting the version field in your application?
-Patrick
On 9/17/07, Gene Woo <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I got the following error messages from application server. I am very
> confused on that. Because this is an isolated entity without any
> relationship to the re
public void method1 (){
EntityManager m = null;
String result = null;
EntityTransaction transaction = null;
try{
m = SessionOperations.getEntityManager();
transaction = SessionOperations.getTransaction(m);
transaction.
Can you post the actual code plus your persistence.xml file please?
-Patrick
On 9/17/07, Gurkan Erdogdu <[EMAIL PROTECTED]> wrote:
> Hi;
>
> When I change User status in method1 using flush, it does not sync with the
> database. It still looks the same status value in other method.
>
> public vo
Hi;
When I change User status in method1 using flush, it does not sync with the
database. It still looks the same status value in other method.
public void method1(){
EntityManager m;
EntityTransaction t;
m.setFLushMode(AUTO);
t = m.gettransaction();
t.begin;
Query q = some query to get User
Hi,
I got the following error messages from application server. I am very
confused on that. Because this is an isolated entity without any
relationship to the rest of entities.
<4|true|0.9.7> org.apache.openjpa.persistence.InvalidStateException: Attempt
to set column "event.update_version" to two
Patrick Linskey-2 wrote:
>
> What happens if you call evict() on the objects that should be made
> hollow?
>
Unfortunately not (from what I can see in my debugger). I think this is also
according to the manual, since evicts only transitions non-dirty objects to
hollow. And as described by the
Actually I'm not sure that the problem is limited to SQLServer only.
Anyway this fix can be moved to AbstractSQLServerDictonary.setNull() I
think.
Here is the patch (tested, works fine for me):
--- AbstractSQLServerDictionary.java.orig 2007-09-17 11:11:
59.0 +0400
+++ AbstractSQLServ
Hi,
What about if you override the setNull() method in SQLServerDictionary
to convert OTHER to VARCHAR?
I generally prefer that approach, since it isolates things to
SQLServer a bit more, but on the other hand, setNull() is called from
a number of places. I wonder if it's ever called with Types.O
Hi,
What happens if you list your persistent types in the persistence.xml
file? OpenJPA has directory-scanning capabilities, but let's start
simple and just list them out.
(FWIW, the JPA spec says that when using JPA outside a container,
classes must be listed.)
-Patrick
On 9/16/07, Ballist1c <
19 matches
Mail list logo