hi ken sorry i've been so long in picking this one up...
On Thu, 2006-05-25 at 15:29 -0600, Ken Miller wrote: > I have an object that contains a Collection of some simple beans, as > well as a couple of attributes. The XML generated by Betwixt looks like > this: > > <FolderList nextFolderId="2" id="1"> > <folder folderId="0" folderName="One" id="2"/> > <folder folderId="1" folderName="Two" id="3"/> > </FolderList> <snip> > The Folder object is instantiated, and the attrributes for it are set > to the correct value, but FolderList.addFolder() is never invoked to > insert the Folder object back into it's parent. The end result is that > the FolderList object is returned with no Folders. Not good. yes - not good > Am I missing a mapping rule somewhere? the problem is likely to be the plural stemming: betwixt guesses the adder from the getter name and matches them up in that fashion. the default plural stemmer algorithm is may not match public void addFolder(Folder folder); public Collection getFolderList(); a good way to test this hypothesis is by unit testing the default plural stemmer. if the problem is the plural stemmer then just create a new strategy extending the default one that knows about your naming conventions. let me know if this doesn't fix the problem and i'll take a deeper look into it. > I'm using the current dev build of Betwixt (as of yesterday). cool BTW i usually spend quite a bit of time setting up scenarios such as this to find out what's going wrong (yes: i know mapping is too hard and obscure - i was working on a GUI application which would help to map betwixt and JIBX last year but got a little sidetracked...). the more time i need to spend to provide an answer, the longer it'll take me to find time. so, anyone who contributes a unit test to the ASF through JIRA demonstrating your particular use case will find a quicker reply... - robert --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
