From: Doug C. <de...@fl...> - 2002-02-09 16:21:29
|
> I was thinking an Ant task might be more useful than a GUI. They would both be useful... > I could > then combine this with a task to drive DBSchemaExport and then the > building of the mapping and generating a db schema becomes just two > clicks in my IDE - call me lazy :-) Unfortunately this is unlikely to work; the MappingByReflection code will probably never be strong enough to get 100% of the mapping. In some cases it might, but it will be the exception. Currently there is no way to generate a top-level collection, for example, and there probably never will be. Other aspects of the mapping cannot be determined by reflection, so the GUI tool would be useful to fine tune the mapping. > On the MappingByReflection side of things all that would be required is > a method to accept a String[] of class names to be mapped, a File for > the mapping to be written to and the uid argument. This method would > also need to throw an exception if a mapping fails or there is an > IOException with the XML file. I think an ant task like this would be useful to get the initial mapping which could be massaged by hand. A second ant task could pass the mapping through DBSchemaExport afterward. Other suggestions to give MappingByReflection more info have included a configuration file, a javadoc tag processor, more extensive property name and typing heuristics, class file disassembly, and my favorite, the GUI tool. e |