I have been re-working the jbosscmp-jdbc stuff, and got it 99% working. But, to simplify the templates (cuts size down by 1/4), I added:
ifIsOne2One ifNotIsOne2One ifIsOne2Many ifNotIsOne2Many to RelationTagsHandler.java The old way was doing a bunch of swap/unswaps and checking for collection type to determin which it was, and that was what was causing me so much grief. Because there were a few cases where (due to conditionals), you'd end up with 2 swaps (thus killing xdoclet). Also changed in RelationTagsHandler.java was that I added relation sorting. ie: 1-N will always have the 1 on the left, and the N on the right 1-1 (doesn't change) N-N (doesn't change) This allows the templates to be even smaller, in that they don't have to duplicate the code everywhere when the relation is flipped. Plus jbosscmp-jdbc has different tags (well, different values for the tags) when defining 1-N relations, so I needed guaranteed order. These changes have no effect on any other part of the system. With the exception of the N-1 flipping I do now, but that shouldn't hurt, since previously it was setup in discovery order (ie: random). Now, for the templates, I added jbosscmp-jdbc-rel-1-1.j : which contains what was in jbosscmp-jdbc.j just to make it cleaner and consistent with the 1-n template Changed: jbosscmp-jdbc-rel-1-n.j : reformatting it to be readable as well as fixing the relationship-rolename bugs it had. jbosscmp-jdbc_xml.j : Added merge with 1-1 file, cleaned up for readability, added calls to the 1-1/1-n/n-n functions described above. Ok, that's more than anyone wanted to hear. So, how can I submit my changes? It'll be 4 files. They should be final by Thursday evening (I can't do real good QA at 5:21am, so I'll leave the testing till then). Also, Dimitri asked a while back why swap() doesn't always swap. (ie we have to do swap/unswap, and can't do swap/swap, which is really inconvenient). But I saw no answer to his question. Does anyone know why? I would like to propose a simple change: swap() would always swap. unswap() would restore to default (being definition order) This would be invisible to already working templates (ie: weblogic relation stuff) But would allow new templates to have an easier time. Anyone mind if I add that also? Ok. I'll shut up now. -David _______________________________________________ Xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel
