db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henning P. Schmiedehausen" <...@intermeta.de>
Subject Re: DatabaseMap empty except for ID_TABLE?
Date Thu, 30 Oct 2003 15:23:59 GMT
Gary Shea <shea@gtsdesign.com> writes:

>I'm trying to track down a problem.  I've been using Torque naively but
>successfully for the last couple of months, but my first attempt to get
>a little fancy has not been successful.

As the table peers are static, you must access the peers first, before
they get added to the dbMap.

Try

String dummy = RC4Peer.TABLE_NAME + SummaryPeer.TABLE_NAME;

and then do it again. Better yet, lobby for my proposal. ;-)

	Regards
		Henning


>I'm trying to do an update using doUpdate(Criteria,Criteria,Connection)
>and running into a NPE at the line:
>    ColumnMap[] columnMaps = tempDbMap.getTable(tab).getColumns();

>The application is using two databases ("rc4" and "summary"); at the
>point of the NPE I have already successfully SELECTed from both and INSERTed
>into "summary".  I tried the following test code (basically the
>beginning of doUpdate()):

>    DB db = Torque.getDB(poolName);
>    DatabaseMap dbMap = Torque.getDatabaseMap(selectCriteria.getDbName());
>    _logger.debug("DB: " + db + " DatabaseMap: " + dbMap);

>    String dbMapName = dbMap.getName();
>    _logger.debug("dbMapName: " + dbMapName);

>    TableMap[] tableMaps = dbMap.getTables();
>    for (int i = 0; i < tableMaps.length; ++i) {
>        _logger.debug(i + ": " + tableMaps[i].getName());
>    }
>    TableMap tableMap = dbMap.getTable(poolTable);
>    _logger.debug("table name: " + poolTable + " tableMap: " + tableMap); 

>For poolName set to either "rc4" or "summary", the only tableMap found
>is for ID_TABLE.  Likewise, in both cases dbMap.getTable(poolTable)
>returns null, hence the NPE in the Torque code.

>Any hints?

>Regards,

>        Gary

>---------------------------------------------------------------------
>To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
>For additional commands, e-mail: torque-dev-help@db.apache.org

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

Java, perl, Solaris, Linux, xSP Consulting, Web Services 
freelance consultant -- Jakarta Turbine Development  -- hero for hire

"Dominate!! Dominate!! Eat your young and aggregate! I have grotty silicon!" 
      -- AOL CD when played backwards  (User Friendly - 200-10-15)

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message