ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akins, Greg" <gak...@amervideo.com>
Subject Translating data between databases
Date Tue, 05 Apr 2005 12:34:27 GMT
I am using SqlMaps (but not DAO)
 
I'm reading data from 3 different databases.
 
Most of the time, I read from a single database, and write to another...
So nothing is "complicated" in Ibatis.
 
However, sometimes I have to read from database "A" while getting lookup
data from database "B"
 
Initially, I wrote a translation method that would get an object with
ID's.. Lookup each ID in database "B" and copy the data with Object
references instead of ID fields to my application
 
Now, thanks to Nathan, I am using a CustomTypeHandler to get "lookup"
values where I didn't feel like putting the data in the database at all
(using type-safe enumerators).
 
It seems like maybe CustomerTypeHandlers would have been appropriate for
integrating multiple datasource, much like integrating datasources with
enumerators;  Does that seem like a bad idea?  Something smells funny
about creating dependencies between the persistence and DAO's in this
manner?
 
 
 
Greg Akins
Software Engineer
Sony Electronics, STP Systems
724.696.7322 (Sony)
724.696.6147 (AV)
724.454.7790 (Cell)
412.590.3973 (Pager)
 

Mime
View raw message