Hi

I just looked in this file and found string
        // Use FOR UPDATE to lock selected tables.
        if ( lock )
            sql.append( " FOR UPDATE" );

I think, for better work with concurent access to
record, this can changed to

        // Use FOR UPDATE to lock selected tables.
        if ( lock )
            sql.append( " FOR UPDATE NOWAIT" );

if we not using "NOWAIT" clause, query wait for
release lock by another session.

>From oracle doc:
NOWAIT  -
 returns control to you if the SELECT statement
attempts to lock a row that is locked by another user.
If you omit this clause, Oracle waits until the row is
available and then returns the results of the SELECT
statement.  

Serg Maslyukov
 

--- Keith Visco <[EMAIL PROTECTED]> wrote:
> 
> Hi Steffen,
> 
> You may want to look at the Castor Oracle driver:
>
org\exolab\castor\jdo\drivers\OracleQueryExpression.java
> 
> It may be that simply more people that use Castor
> are using MySQL and
> PostgresSQL since they are free as opposed to the
> more expensive Oracle,
> and therefore those drivers have less bugs.
> 
> Anyway...just a thought. 
> 
> --Keith
> 
> Steffen Fiedler wrote:
> > 
> > Hi,
> > 
> > I posted this already but found no solution
> despite
> > I looked at all the castor-examples and couldn't
> find any mistake.
> > I work with Oracle 8i (8.1.7.) and Castor 0.9.4.
> > When I use mySQL or PostreSQL, the same example
> works (just exchanging
> > the database.xml), so i think it could be a bug.
> > My oracle-driver is up to date, and when i remove
> the many-to-many field
> > from mapping.xml it works with oracle too.
> > 
> > Here is the problem again, a simple many-to-many
> relation mapping
> > 
> > my mapping.xml:
> > [...]
> > <class name="com.xyz.access.User" identity="id">
> >      <map-to table="USERS"/>
> > 
> >      <field name="id" type="integer" >
> >        <sql name="ID" type="integer"/>
> >        <xml node="attribute"/>
> >      </field>
> > 
> >      <field name="name" type="string">
> >        <sql name="NAME" type="char" dirty="check"
> />
> >        <xml node="text" />
> >      </field>
> > 
> >      <field name="password" type="string">
> >        <sql name="PASSWORD" type="char"
> dirty="check" />
> >        <xml node="text" />
> >      </field>
> > 
> >      <field name="roles"
> type="com.xyz.workflows.Role"
> > collection="arraylist">
> >        <sql name="ROLE_ID"
> many-table="ROLES_USERS" many-key="USER_ID"/>
> >      </field>
> > </class>
> > 
> > <class name="com.xyz.workflows.Role" 
> identity="id">
> >      <map-to table="ROLES"/>
> > 
> >      <field name="id" type="integer" >
> >        <sql name="ID" type="integer"/>
> >        <xml node="attribute"/>
> >      </field>
> > 
> >      <field name="name" type="string">
> >        <sql name="NAME" type="char" dirty="check"
> />
> >        <xml node="text" />
> >      </field>
> > 
> >    <field name="users" type="com.xyz.access.User"
> collection="arraylist">
> >       <sql name="USER_ID" many-table="ROLES_USERS"
> many-key="ROLE_ID"/>
> >    </field>
> > </class>
> > [...]
> > 
> > and my sql-tables:
> > USERS:
> >      ID        NUMBER
> >      NAME      VARCHAR
> >      PASSWORD  VARCHAR
> > ROLES:
> >      ID        NUMBER
> >      NAME      VARCHAR
> > ROLES_USERS:
> >      ID        NUMBER
> >      ROLE_ID   NUMBER
> >      USER_ID   NUMBER
> > 
> > When i execute any OQL-query like 'OQL-Querry:
> SELECT id FROM
> > com.xyz.access.User id where
> > name="superuser"' i get the error-message:
> java.sql.SQLException:
> > ORA-00936: missing expression.
> > 
> > Could anyone confirm or refute this claim?
> > 
> > Thanks for any suggestions.
> > Steffen
> > 
> >
>
-----------------------------------------------------------
> > If you wish to unsubscribe from this mailing, send
> mail to
> > [EMAIL PROTECTED] with a subject of:
> >         unsubscribe castor-dev
> 
>
-----------------------------------------------------------
> 
> If you wish to unsubscribe from this mailing, send
> mail to
> [EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev
> 


=====
If you can`t read  this message, try charset WINDOWS-1251



__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to