Re: OneToMany(mappedBy...) special case

2007-12-13 Thread Gene Woo
rtyRole")? Something > tells me no. > > If this is not possible, is there another way to accomplish this? Perhaps > an object that represents a link table between these two entities? > > Kind regards, > -- > Alexander R. Saint Croix > -- Best Regards, Gene Woo

Re: SQL select when merging detached entity

2007-09-22 Thread Gene Woo
AIL PROTECTED]> wrote: > > 18.09.07 в 11:30 Gene Woo в своём письме писал(а): > > > why do you want to disable SELECT query? > > > > in my opinion, SELECT is a very important step for merging a detached > > object. If no SELECT, how does JPA know it&

What's the sequence of calling Persist and Update interceptors in the persist scenario?

2007-09-20 Thread Gene Woo
ceptors after commit. -- Best Regards, Gene Woo

Re: Does anyone meet the conflict values in version column?

2007-09-18 Thread Gene Woo
ntEntity.setDateTime(sqlDate); eventEntity.setFromId(1); eventEntity.setTypeCid(1); eventEntity.setFromClassId(1); eventEntity.setStatusCid(1); return eventEntity; } } On 9/19/07, Gene Woo <[EMAIL PROTECTED]> wrote: > > In this morning, I tested my

Re: Does anyone meet the conflict values in version column?

2007-09-18 Thread Gene Woo
In this morning, I tested my code(same as a SessionBean) with an injected EM(non-jta). Everything works fine. Seems that problem is due to managed transaction setting. But I don't why it comes... Gene On 9/19/07, Gene Woo <[EMAIL PROTECTED]> wrote: > > Hi, > > Here is t

Re: Does anyone meet the conflict values in version column?

2007-09-18 Thread Gene Woo
Cid = cid; } public Date getDateTime() { return _dateTime; } public void setDateTime(Date time) { _dateTime = time; } } On 9/18/07, Patrick Linskey <[EMAIL PROTECTED]> wrote: > > Can you post the definitions for both classes in the hierarchy please

Re: Does anyone meet the conflict values in version column?

2007-09-18 Thread Gene Woo
er, Long or DateType) with annotation @Version. Is this the > one > > you mentioned as manually setting? > > There is (presumably) some field in your object that is marked as > @Version. Are you assigning a value to that field? > > -Patrick > > On 9/17/07, Gene Woo &

Re: SQL select when merging detached entity

2007-09-18 Thread Gene Woo
; > user.setFirstName("222"); > > em = emf.createEntityManager(); > em.getTransaction().begin(); > user = em.merge(user); > em.persist(user); > em.getTransaction().commit(); > em.close(); > > > > And when утешне is merged the additonal query is made to DB. > > -- > Best Regards > Evgeny K. Shepelyuk > -- Best Regards, Gene Woo

Re: Does anyone meet the conflict values in version column?

2007-09-17 Thread Gene Woo
. On 9/18/07, Patrick Linskey <[EMAIL PROTECTED]> wrote: > > 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

Does anyone meet the conflict values in version column?

2007-09-17 Thread Gene Woo
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