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 cr...@yahoo.com on 2004/12/13 19:57:12 UTC
Can I encode elements directly into sql-map-config.xml?
I'm really interested in using SqlMaps, but am
reticent to use it with the onerous requirement of
creating separate XML configuration files for EACH of
my persistent JavaBeans. This requirement is also one
of the things that turns me off about
Hibernate...sigh...
Is there a setting where I can group all my <sqlMap>
elements into a single sql-map.xml file, or, even
better, but them all into my sql-map-config.xml file?
Thanks!
crarmor
Re: Can I encode elements directly into sql-map-config.xml?
Posted by Clinton Begin <cl...@gmail.com>.
Hey Crarmor,
Larry's right. iBATIS actually requires a minimum of only two files.
One SQL Map Config file, then at least one SQL Map file. You can put
all of your mappings in that single SQL Map file. There is no
dependency on the classes or database tables. As a best practice I
usually recommend making intelligent decisions as to the cohesion of
the maps in each file. I actually never recommend basing the file
organization on classes or tables (it would simply result in too many
mapping files, as I'm sure you agree).
Cheers,
Clinton
On Mon, 13 Dec 2004 10:57:12 -0800 (PST), crarmor-ibatis@yahoo.com
<cr...@yahoo.com> wrote:
> I'm really interested in using SqlMaps, but am
> reticent to use it with the onerous requirement of
> creating separate XML configuration files for EACH of
> my persistent JavaBeans. This requirement is also one
> of the things that turns me off about
> Hibernate...sigh...
>
> Is there a setting where I can group all my <sqlMap>
> elements into a single sql-map.xml file, or, even
> better, but them all into my sql-map-config.xml file?
>
> Thanks!
> crarmor
>