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 flanagann <fl...@telecable.es> on 2010/04/08 09:59:16 UTC

Insert using a Map

Hello, hope you can help me with this issue.

I'm trying to do an INSERT operation as follows:

<insert 	id = "permissionsGroup.addPermission" parameterClass =
"java.util.Map">	
	INSERT INTO FOO_TABLE (ID1, ID2) VALUES 
	(#permissionsGroupId#,	#permission#.id)			
</insert>

The map contains two pairs <key, value>:
- <"permissionsGroupId", Integer>
- <"permission", Permission>
where Permission is a not primitive Object.

What I want to do is to insert the parameter 'id' from the object
Permission. How can I get this working?

Thanks in advance!
-- 
View this message in context: http://old.nabble.com/Insert-using-a-Map-tp28175373p28175373.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Re: Insert using a Map

Posted by Larry Meadors <la...@gmail.com>.
#permission.id#

On Thu, Apr 8, 2010 at 1:59 AM, flanagann <fl...@telecable.es> wrote:
>
> Hello, hope you can help me with this issue.
>
> I'm trying to do an INSERT operation as follows:
>
> <insert         id = "permissionsGroup.addPermission" parameterClass =
> "java.util.Map">
>        INSERT INTO FOO_TABLE (ID1, ID2) VALUES
>        (#permissionsGroupId#,  #permission#.id)
> </insert>
>
> The map contains two pairs <key, value>:
> - <"permissionsGroupId", Integer>
> - <"permission", Permission>
> where Permission is a not primitive Object.
>
> What I want to do is to insert the parameter 'id' from the object
> Permission. How can I get this working?
>
> Thanks in advance!
> --
> View this message in context: http://old.nabble.com/Insert-using-a-Map-tp28175373p28175373.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org