Re: Mapping a Complex Object

2010-01-04 Thread Dan Forward
Martin Ellis-6 wrote: > > Perhaps an alternative to individual classes for each data type would > be to use the builder pattern? That would avoid having many, many > parameters on the constructor for the User class. This might help > with the problem of figuring out whether arguments at the ca

Re: Mapping a Complex Object

2010-01-04 Thread Dan Forward
nmaves wrote: > > Dan, > > In short I think the largest issue I have seen with your thought process > is > over design issues. You reference that you want to use Guice but the > Guice > team would disagree with your approach to use static factory methods > instead > of constructors. DI framew

Re: Mapping a Complex Object

2010-01-04 Thread Dan Forward
main layer than try to build a new persistence layer from scratch, as sad as that may be. Thank you for building such a great tool! Despite my moanings, I think you have done an outstanding job with it. If at all possible, I hope I can contribute back to iBATIS and make it better. Sincerely, Dan

Re: Mapping a Complex Object

2010-01-03 Thread Dan Forward
; In fact I am supplying my own ObjectFactory. It is just a copy and paste job from DefaultObjectFactory that first checks for static factory methods on the class, so it is for general use. It looks like there can be only one ObjectFactory per iBATIS configuration. I suppose I could inspect the

Re: Mapping a Complex Object

2010-01-02 Thread Dan Forward
27;t it be nice to have a persistence layer that transparently accommodated the domain model? What if I wanted to use a separate Factory class to create my User objects? I am willing to help make these changes to iBATIS if I am not missing something that may already be there. Sincerely, Dan Forwar

Re: Mapping a Complex Object

2009-12-30 Thread Dan Forward
Guy Rouillier-2 wrote: > > > You don't say what version of iBATIS you are using. Since you say you > are new, so I'm guessing you are using iBATIS 3. You shouldn't need any > callbacks; from your description, a simple ResultMap should suffice. > Take a look at the iBATIS 3 User Guide, part

Mapping a Complex Object

2009-12-29 Thread Dan Forward
I am new to iBATIS and I am having difficulty mapping our User object, which consists of several custom objects, some of which span multiple columns in the database. However, all the data for the user is stored in one table. These are the properties of my User object: private UserID id; private