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
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
It is also supported :-)
-Gilles
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,
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
?
-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
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
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/
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
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
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
11 matches
Mail list logo