Re: Criteria needs write permissions?

2009-11-17 Thread Thomas Vandahl
Greg Monroe wrote: > Connection srcConn = Torque.getConnection("databaseA"); > Connection destConn = Torque.getConnection("databaseB"); Don't want to be picky, but the recommended method is Connection srcConn = Transaction.begin("databaseA"); > } finally { > Torque.closeConnection(

RE: Criteria needs write permissions?

2009-11-17 Thread Greg Monroe
com] > Sent: Monday, November 16, 2009 5:19 PM > To: Apache Torque Users List > Subject: Re: Criteria needs write permissions? > > "Second, create all criteria element using the *Peer objects. The > DatabaseMap is populated when a *Peer class is loaded (static init). > So

Re: Criteria needs write permissions?

2009-11-16 Thread Sheldon Ross
ge- From: Alvaro Coronel [mailto:alvarocorone...@yahoo.com] Sent: Friday, November 13, 2009 10:50 AM To: Apache Torque Users List Subject: Re: Criteria needs write permissions? Does that mean that a Torque object can be used with two different connections as long as no pool is involved? _____

RE: Criteria needs write permissions?

2009-11-16 Thread Greg Monroe
t; Sent: Friday, November 13, 2009 10:50 AM > To: Apache Torque Users List > Subject: Re: Criteria needs write permissions? > > Does that mean that a Torque object can be used with two different > connections as long as no pool is involved? > > > >

Re: Criteria needs write permissions?

2009-11-13 Thread Alvaro Coronel
Does that mean that a Torque object can be used with two different connections as long as no pool is involved? From: Thomas Vandahl To: torque-user@db.apache.org Sent: Fri, November 13, 2009 1:27:26 PM Subject: Re: Criteria needs write permissions? On

Re: Criteria needs write permissions?

2009-11-13 Thread Thomas Vandahl
On 13.11.09 08:12, Thomas Fischer wrote: > I'm not sure whether this is a bug or not, I need to think about it. If i > remember correctly, the database name is used for the database connection > (including credentials) and the table layout. Probably there are some cases > where this wants to be tre

Re: Criteria needs write permissions?

2009-11-12 Thread Thomas Fischer
> Ok, I apologize for the traffic. No reason to apologize for anything. This is a perfectly valid question. > Here goes, when you build the database objects, it hardcodes in the > database name that exists in your schema.xml. The code is in the > doBuild() method of the ${Table}MapBuild.java > >

Re: Criteria needs write permissions?

2009-11-12 Thread Sheldon Ross
put forth a plan for Torque 4 to separate the connection pool name from the schema name. This would require objects and criteria to track which pool they came from. -Original Message- From: Sheldon Ross [mailto:sr...@simmgene.com] Sent: Thursday, November 12, 2009 4:28 PM To: Apache To

RE: Criteria needs write permissions?

2009-11-12 Thread Greg Monroe
oss [mailto:sr...@simmgene.com] > Sent: Thursday, November 12, 2009 4:28 PM > To: Apache Torque Users List > Subject: Re: Criteria needs write permissions? > > Ok, I think this maybe a bug. After watching the addTable method in > DatabaseMap, It appears to add the table to th

Re: Criteria needs write permissions?

2009-11-12 Thread Sheldon Ross
kage. This is because it provided a "known" class that "knows" (via extension) the "user settable" om package. -Original Message- From: Sheldon Ross [mailto:sr...@simmgene.com] Sent: Thursday, November 12, 2009 3:25 PM To: Apache Torque Users List Subject: R

Re: Criteria needs write permissions?

2009-11-12 Thread Sheldon Ross
nows" (via extension) the "user settable" om package. -Original Message- From: Sheldon Ross [mailto:sr...@simmgene.com] Sent: Thursday, November 12, 2009 3:25 PM To: Apache Torque Users List Subject: Re: Criteria needs write permissions? The why is a good question, the t

Re: Criteria needs write permissions?

2009-11-12 Thread Sheldon Ross
ue package. This is because it provided a "known" class that "knows" (via extension) the "user settable" om package. -Original Message- From: Sheldon Ross [mailto:sr...@simmgene.com] Sent: Thursday, November 12, 2009 3:25 PM To: Apache Torque Users List Subje

RE: Criteria needs write permissions?

2009-11-12 Thread Greg Monroe
To: Apache Torque Users List > Subject: Re: Criteria needs write permissions? > > The why is a good question, the table is not found. The tables hashmap > in the dbMap appears to be empty. > It of course is found when using the other db connection. It looks like > I'm gonna h

Re: Criteria needs write permissions?

2009-11-12 Thread Sheldon Ross
The why is a good question, the table is not found. The tables hashmap in the dbMap appears to be empty. It of course is found when using the other db connection. It looks like I'm gonna have to dig for awhile. Thanks. Thomas Fischer wrote: The null ointer exception seems to come from reading

Re: Criteria needs write permissions?

2009-11-11 Thread Thomas Fischer
The null ointer exception seems to come from reading the table or column map. Can you put a breakpoint in SQLBuilder.java:497 and see whether the table or the column cannot be found (and why it is not found)? Thomas > Ok so I was trying to make our site a little safer from sql injections, > s

Criteria needs write permissions?

2009-11-11 Thread Sheldon Ross
Ok so I was trying to make our site a little safer from sql injections, so I made a database connection that connects with a user that only has SELECT permissions. And edited Criteria like such public Criteria() { this(DEFAULT_CAPACITY); this.setDbName("readonlydatabase"); }