Hi Leon,
Thanx for your reply, the code you provided was what I first tried without
success but now I know why it didn't work. I hadn't loaded the
TurbineProperties file in the test program (it was late) . Now a new day and
your input it works!!!! :-)
I take my hat of to you guys this (Turbine) is good!
Now that I'm (slowley) getting to grips with Turbine I hope I can help play
a role in it's further development.
/colin
> Hi,
>
> Check the CompanyPeer class - all it's methods should be static, so you
> should never need to create instances of the Peer class.
>
> Your example should look like this:
>
> Criteria crit = new Criteria();
> crit.add(CompanyPeer.COMPANYID, 10);
> Vector Company = CompanyPeer.doSelect(crit);
>
> This should solve your problem.
>
> ~ Leon
>
> > Hi,
> >
> > I've been looking at Torque for helping me create new (peer & map)
objects
> > for accessing databases. However I seem to be running into some
> > difficulties..... again :-(
> >
> > Torque did it's job (VERY) well !! Now I'm trying to use the objects. I
> can
> > access them but I keep getting an exception in BasePeer because I think
> the
> > dbmapName is not correctly set. What is the correct procedure to access
> the
> > database? this is what I am naively trying now
> >
> > CompanyPeer cP = new CompanyPeer();
> > Criteria crit = new Criteria();
> > crit.add(cP.COMPANYID, 10);
> > Vector Company = cP.doSelect(crit);
> >
> > And this is where it's going wrong.
> >
> > if (PoolBrokerService.getInstance().getDB(criteria.getDbName())
> > .objectDataNeedsTrans() &&
> > criteria.containsObjectColumn(criteria.getMapName()))
> >
> >
> > Thanx
> >
> > Colin
>
>
>
>
> ------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?: [EMAIL PROTECTED]
>
>
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]