Hello. I have created a "factory" to instantiate a
BasePeer class based on a string, entity.
My code looks like this:
BasePeer objectPeer =
torquePeerFactory.createObjectPeer(entity);
... So if I receive "myEntity" as the string, it
should call the createObjectPeer() method, which does
the following:
return new MyEntityPeer();
Great. But when I create a new Criteria() object and
call objectPeer.doSelect(), my SQL string is "SELECT
FROM". In other words it is missing the column names
and table name.
>From looking at the mail archives I see this is
because you must call explicitly
MyEntityBasePeer.doSelect(), and not just
BasePeer.doSelect(), if you want it to automatically
populate the SELECT statement.
So I need do a cast somewhere ... But I don't want to
put a bunch of "if" statements, like:
if (entity=='x')
objectPeer=(XBaseObjectPeer)objectPeer
... Any suggestions?
Thanx,
syg
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]