On 30 April 2010 08:58, Joram Barrez <joram.bar...@gmail.com> wrote: > However, I only have XML mapping files (so no mapper class). How can I > add these to a Configuration? I can't seem to find the right method.
I've found this in my code, which seems a little complicated, but it gets the job done. It's code I wrote when I first started using iBATIS (early 3.0 betas), so there might well be an easier way. private static void addSqlMappings(Configuration conf) { Map<String, XNode> xmlMap = new HashMap<String, XNode>(); Reader map; try { map = Resources.getResourceAsReader("package/name/mapper.xml"); } catch (IOException ex) { throw new RuntimeException(ex); } XMLMapperBuilder xmlParser = new XMLMapperBuilder(map, conf, "mapper.xml", xmlMap, ibatisNamespace); xmlParser.parse(); } Martin --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org For additional commands, e-mail: user-java-h...@ibatis.apache.org