Re: ResultMap with constructor injection

2006-07-18 Thread Jeremy Burks
a result element since the default for minOccurs is 1. We need to add monOccurs=0 to the result to make it optional. - Oddur -Original Message- From: Peter Mills [mailto:[EMAIL PROTECTED] Sent: 18. júlí 2006 04:48 To: user-cs@ibatis.apache.org Subject: Re: ResultMap with constructor injection

Re: ResultMap with constructor injection

2006-07-18 Thread Gilles Bayon
Iwill correct it On 7/18/06, Oddur Snær Magnússon [EMAIL PROTECTED] wrote: True, the schema will not validate without a result element since the default for minOccurs is 1. We need to add monOccurs=0 to the result to make it optional. - Oddur-Original Message-From: Peter Mills

Re: ResultMap with constructor injection

2006-07-18 Thread Gilles Bayon
It is also supported :-) -Gilles

ResultMap with constructor injection

2006-07-17 Thread Peter Mills
Greetings, It does not currently seem possible to create a resultMap, in DataMapper 1.5 Beta, which only does constructor based injection. If there is no result element, then execution fails with an XmlSchemaValidationException. If I'm not in error, and this functionality doesn't exist,

RE: ResultMap with constructor injection

2006-07-17 Thread Alexandre Grenier
You mean to allow read only instance members? -Original Message- From: Peter Mills [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 8:44 PM To: user-cs@ibatis.apache.org Subject: ResultMap with constructor injection Greetings, It does not currently seem possible to create

Re: ResultMap with constructor injection

2006-07-17 Thread Peter Mills
? -Original Message- From: Peter Mills [mailto:[EMAIL PROTECTED] Sent: Monday, July 17, 2006 8:44 PM To: user-cs@ibatis.apache.org Subject: ResultMap with constructor injection Greetings, It does not currently seem possible to create a resultMap, in DataMapper 1.5 Beta, which only does

Re: ResultMap with constructor injection

2006-07-17 Thread Clinton Begin
In Java land I was thinking of simply adding the following to the current result element...Currently we can do: result property =FirstName column=FIRST_NAME /I'd like to add... result field =_firstName column=FIRST_NAME/ !-- I'm not advocating underscores --...and... result column=FIRST_NAME /The

Re: ResultMap with constructor injection

2006-07-17 Thread Ron Grabowski
DataMapper 1.5 supports this notation (IBATISNET-155): resultMap id=account-result-constructor class=Account constructor argument argumentName=id column=Account_ID/ argument argumentName=firstName column=Account_FirstName/ argument argumentName=lastName column=Account_LastName/

Re: ResultMap with constructor injection

2006-07-17 Thread Clinton Begin
Wow, I gotta read the docs. :-)BTW: What's the argumentName attribute for? Can C# introspect on the argument names?Cheers,ClintonOn 7/17/06, Ron Grabowski [EMAIL PROTECTED] wrote: DataMapper 1.5 supports this notation (IBATISNET-155):resultMap id=account-result-constructor class=Account

Re: ResultMap with constructor injection

2006-07-17 Thread Ron Grabowski
System.Type instances have a GetConstructor() method which returns a System.Reflection.ConstructorInfo object. ConstructorInfo instances have a GetParameters() method which returns an array of ParameterInfo objects. Some of the properties on the ParameterInfo object are: Name:string

Re: ResultMap with constructor injection

2006-07-17 Thread Peter Mills
Just to recap, in case there's any confusion: constructor injection seems to be working perfectly, as long as you're also doing property/field injection on the object as well. Doing constructor injection, alone, does not seem to be supported. I'm not familiar with .xsd schemas, but here is