ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janluc <htpwraxkvv...@mailinator.com>
Subject Re: Could not find resource error
Date Tue, 21 Mar 2006 16:38:17 GMT

Yeah! That worked! I am *so* proud of my first working sqlmap insert! I told
everbody in my room and was looked in bewilderment...

>From the Application.java class:


		SystemElement se = new SystemElement();
		se.setSeName("test");
		se.setSeType("test type");
		se.setSeDescription("description bla bla bla");
		try {
			sqlMap.insert("system_element.abatorgenerated_insert", se);
		} catch (SQLException e) {
			e.printStackTrace();
		}


After execution, in the mysql client app:


mysql> select * from system_element;
+-------+--------------+---------+-----------+-------------------------+
| SE_ID | SE_PARENT_ID | SE_NAME | SE_TYPE   | SE_DESCRIPTION          |
+-------+--------------+---------+-----------+-------------------------+
|     1 |         NULL | test    | test type | description bla bla bla |
+-------+--------------+---------+-----------+-------------------------+
1 row in set (0.00 sec)


*shouts of joy*

Thank you a lot, Jeff!

JL


Jeff Butler-2 wrote:
> 
> Wow!  Great job on figuring this out.  You're so close...
> 
> I think the only thing you need to change is on your insert statement:
> 
> sqlMap.insert("NAMESPACE.abatorgenerated_insert", se);
> 
> Where NAMESPACE is the namespace of the generated SQL Map - you can see it
> on the  element in the XML file.  When you enable statement
> namespaces, all statement ids must be qualified like this.
> 
> Jeff Butler
> 
> 
--
View this message in context: http://www.nabble.com/Could-not-find-resource-error-t1310881.html#a3515686
Sent from the iBATIS - User - Java forum at Nabble.com.

Mime
View raw message