Basically, it works like a package in java, or namespaces in C#.

If you have a mapped statement named "insert" with a namespace of
"department", you call it using the name "department.insert".

So, why do that instead of insertDepartment? Well, it makes things
lots easier if you want to make smarter dao classes that know that you
always use "insert" to insert an object, and if you pass a Department
object, it can figure that part out, too.

It's also real nice organizationally, if you name the xml file to
match the namespace - then you know exactly where to find
"department.insert", too.

Larry


On 12/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

To all,

In IBATIS documentation I cannot see any usage of namespace (global setting
in sql-map-config,xml and references in
<sqlMap namespace="xxxxxx"> portion of xml files included in
sql-map-config,xml  ).

Please send me example of code.

Reply via email to