You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Gilles Bayon (JIRA)" <ib...@incubator.apache.org> on 2008/01/05 14:26:34 UTC
[jira] Created: (IBATISNET-254) Better support for nested result
maps when using dictionary
Better support for nested result maps when using dictionary
-----------------------------------------------------------
Key: IBATISNET-254
URL: https://issues.apache.org/jira/browse/IBATISNET-254
Project: iBatis for .NET
Issue Type: Bug
Components: DataMapper
Affects Versions: DataMapper 1.6.1
Reporter: Gilles Bayon
Assignee: Gilles Bayon
Fix For: DataMapper 1.6.2
If class for result map is dictionary (or inherits dictionary) it is not
possible to use nested result maps to put complex objects into dictionary.
The problem is in ResultProperty.MemberType property. Currently it is
implemented like this:
public virtual Type MemberType
{
get { return _setAccessor.MemberType; }
}
But if the class for result map is dictionary, _setAccessor is null then
this getter is called from Get method of PropertyStrategyFactory class (line
88). We propose to change it to:
public virtual Type MemberType
{
get
{
if (_setAccessor != null)
{
return _setAccessor.MemberType;
}
if (_nestedResultMap != null)
{
return _nestedResultMap.Class;
}
throw new IBatisNetException(
String.Format(CultureInfo.InvariantCulture,
"Could not resolve member type for result property '{0}'. Neither
nested result map nor typed setter was provided.",
_propertyName));
}
}
In this case if set accessor is not initialized yet but nested result map is
set, class from nested result map is used. Maybe this getter can also
consider CLRType if nothing else is provided.
Currently we are using 'patched' version of iBATIS but we would like to get
back to mainline when these issues are fixed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (IBATISNET-254) Better support for nested result
maps when using dictionary
Posted by "Gilles Bayon (JIRA)" <ib...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/IBATISNET-254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gilles Bayon closed IBATISNET-254.
----------------------------------
Resolution: Fixed
In SVN
> Better support for nested result maps when using dictionary
> -----------------------------------------------------------
>
> Key: IBATISNET-254
> URL: https://issues.apache.org/jira/browse/IBATISNET-254
> Project: iBatis for .NET
> Issue Type: Bug
> Components: DataMapper
> Affects Versions: DataMapper 1.6.1
> Reporter: Gilles Bayon
> Assignee: Gilles Bayon
> Fix For: DataMapper 1.6.2
>
>
> If class for result map is dictionary (or inherits dictionary) it is not
> possible to use nested result maps to put complex objects into dictionary.
> The problem is in ResultProperty.MemberType property. Currently it is
> implemented like this:
> public virtual Type MemberType
> {
> get { return _setAccessor.MemberType; }
> }
> But if the class for result map is dictionary, _setAccessor is null then
> this getter is called from Get method of PropertyStrategyFactory class (line
> 88). We propose to change it to:
> public virtual Type MemberType
> {
> get
> {
> if (_setAccessor != null)
> {
> return _setAccessor.MemberType;
> }
> if (_nestedResultMap != null)
> {
> return _nestedResultMap.Class;
> }
> throw new IBatisNetException(
> String.Format(CultureInfo.InvariantCulture,
> "Could not resolve member type for result property '{0}'. Neither
> nested result map nor typed setter was provided.",
> _propertyName));
> }
> }
> In this case if set accessor is not initialized yet but nested result map is
> set, class from nested result map is used. Maybe this getter can also
> consider CLRType if nothing else is provided.
> Currently we are using 'patched' version of iBATIS but we would like to get
> back to mainline when these issues are fixed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.