Julia Stobbe wrote:
> 
> taking up this old thread again, sorry about the delay ...
> 
> > > another problem regarding transactions will be coming up: when testing
> > > whether transactions are needed, criteria.containsObjectColumn(dbname)
> > > only returns true when criteria is not empty...not always a valid
> > > assumption, i think.
> >
> >I don't usually need transactions, so forgive me if this is obvious,
> >but can you provide a use case for this and/or a patch which
> >illustrates a fix for this insidious situation?
> >Daniel
> example:
> working with turbine-release (turbine-src-2.1) code, i try to get all users :
> 
> Criteria crit = new Criteria();
> User [] users = TurbineSecurity.getUsers(crit);
> 
> This results in a DataBackendException:
> Failed to retrieve users: FastPath call returned ERROR ...
> 
> Problem lies in the call to super.elements() in method
> Criteria.containsObjectColumn -
> with an empty Criteria object (no criterions in hashtable) this method will
> always return false,
> resulting in BasePeer .doSelect (criteria) choosing the branch "no
> transaction needed",
> resulting in postgresql Error.
> 
> But what to do doctor ??
> 
> in method Criteria.containsObjectColumn (dbname):
> // check
> if super.isEmpty()
>      // i need the tableNames in order to get a TableMap
>      // which i can ask whether it contains an object column
>      // where do i get these from?
>      // try to get the tableNames of the selected columns out of the
> criteria-object?
> 
> i am at a loss here ..
> perhaps somebody who knows his way around criteria/criterion could point me
> in the right direction
> 
> thanks in advance
> julia
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
Hi julia.
I'm just beginning to find this problem yesterday. It seems to be a
problem whith Criteria, made by the BasePeer.doSelect() method.

I'm going in the criteria class, and try to find who??
If you can go on irc, to talk about this.

Jerome Verleyen
-- 
 Internet, �a rend con et �a abime les yeux.
 Feriez mieux de regarder la t�l�.
 -+- DM in: Guide du Cabaliste Usenet - Quelques �vidences -+-

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to