You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Nathan Coast <na...@codeczar.com> on 2005/02/03 12:14:01 UTC

nested properties as query parameters?

is this sytax legal?

#album.id#

this would be resolved as the id property of the album property of the 
parameterClass object.

if not, would it be possible to adopt the commons-beanutils sytax for 
resolving properties?

http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils/PropertyUtilsBean.html 


just a suggestion....

afaict only simple properties are supported, using beanutils property 
resolution should be backwards compatible at the same time enabling 
nested, indexed and mapped properties.

cheers Nathan

-- 
Nathan Coast
Managing Director
Codeczar Ltd
mob : (852) 9049 5581
tel : (852) 2834 8733
fax : (852) 2834 8755
web : http://www.codeczar.com

Re: nested properties as query parameters?

Posted by Philippe Laflamme <ph...@mail.mcgill.ca>.
Not sure where/if its documented, but yes, it's legal.

I looked really quickly at both SQLMap guide and tutorial and could not 
find an example, but I know for a fact that it is legal...

For example:

SELECT *
FROM someTable
<dynamic prepend="WHERE">
   <isNotNull property="aProperty.aNestedProperty">
     aValue = #aProperty.aNestedProperty#
   </isNotNull>
</dynamic>


Nathan Coast wrote:
> thanks Michal,
> 
> the example you mention is for a resultMap not a parameterClass, is it 
> still OK.   When I tried some code it threw an error so assumed it 
> wasn't legal. If it is allowed then I guess I got something else wrong.
> 
> cheers Nathan
> 
> Michal Malecki wrote:
> 
>> It's legal, you can check example in manual, page 26 top
>> Michal Malecki
>> ps what sqlmap lacks are nested loops (iterate inside iterate). maybe one
>> day I will play with it ;)
>>
>>
>>> is this sytax legal?
>>>
>>> #album.id#
>>>
>>> this would be resolved as the id property of the album property of the
>>> parameterClass object.
>>>
>>> if not, would it be possible to adopt the commons-beanutils sytax for
>>> resolving properties?
>>>
>>>
>>
>> http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils/PropertyUtilsBean.html 
>>
>>
>>>
>>> just a suggestion....
>>>
>>> afaict only simple properties are supported, using beanutils property
>>> resolution should be backwards compatible at the same time enabling
>>> nested, indexed and mapped properties.
>>>
>>> cheers Nathan
>>>
>>> -- 
>>> Nathan Coast
>>> Managing Director
>>> Codeczar Ltd
>>> mob : (852) 9049 5581
>>> tel : (852) 2834 8733
>>> fax : (852) 2834 8755
>>> web : http://www.codeczar.com
>>>
>>
>>
>>
>>
>>
> 


Re: nested properties as query parameters?

Posted by Nathan Coast <na...@codeczar.com>.
thanks Michal,

the example you mention is for a resultMap not a parameterClass, is it 
still OK.   When I tried some code it threw an error so assumed it 
wasn't legal. If it is allowed then I guess I got something else wrong.

cheers Nathan

Michal Malecki wrote:
> It's legal, you can check example in manual, page 26 top
> Michal Malecki
> ps what sqlmap lacks are nested loops (iterate inside iterate). maybe one
> day I will play with it ;)
> 
> 
>>is this sytax legal?
>>
>>#album.id#
>>
>>this would be resolved as the id property of the album property of the
>>parameterClass object.
>>
>>if not, would it be possible to adopt the commons-beanutils sytax for
>>resolving properties?
>>
>>
> 
> http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils/PropertyUtilsBean.html
> 
>>
>>just a suggestion....
>>
>>afaict only simple properties are supported, using beanutils property
>>resolution should be backwards compatible at the same time enabling
>>nested, indexed and mapped properties.
>>
>>cheers Nathan
>>
>>-- 
>>Nathan Coast
>>Managing Director
>>Codeczar Ltd
>>mob : (852) 9049 5581
>>tel : (852) 2834 8733
>>fax : (852) 2834 8755
>>web : http://www.codeczar.com
>>
> 
> 
> 
> 
> 

-- 
Nathan Coast
Managing Director
Codeczar Ltd
mob : (852) 9049 5581
tel : (852) 2834 8733
fax : (852) 2834 8755
web : http://www.codeczar.com

Re: nested properties as query parameters?

Posted by Michal Malecki <mi...@poczta.onet.pl>.
It's legal, you can check example in manual, page 26 top
Michal Malecki
ps what sqlmap lacks are nested loops (iterate inside iterate). maybe one
day I will play with it ;)

> is this sytax legal?
>
> #album.id#
>
> this would be resolved as the id property of the album property of the
> parameterClass object.
>
> if not, would it be possible to adopt the commons-beanutils sytax for
> resolving properties?
>
>
http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils/PropertyUtilsBean.html
>
>
> just a suggestion....
>
> afaict only simple properties are supported, using beanutils property
> resolution should be backwards compatible at the same time enabling
> nested, indexed and mapped properties.
>
> cheers Nathan
>
> -- 
> Nathan Coast
> Managing Director
> Codeczar Ltd
> mob : (852) 9049 5581
> tel : (852) 2834 8733
> fax : (852) 2834 8755
> web : http://www.codeczar.com
>