Hi,
I have about 200 tables and what i've done is group certain child tables in a logical domain.
Don't want to deal with so many scattered xml files for each table.
For example:
If I had parent table PERSON and 3 child tables say PERSON_CHILD1, PERSON_CHILD2, PERSON_CHILD3
can I create one sqlmap file say Person.xml
and then in the file will be ...
<sqlMap namespace="person">
<!-- PERSON -->
<typeAlias alias="person" type="com.yah.nah.Person" />
<insert id="insertPerson" parameterClass="person" >
insert into ......
</insert>
<!-- PERSON_CHILD1 -->
<typeAlias alias="personchild1" type="com.yah.nah.PersonChild1" />
<insert id="insertPersonChild1" parameterClass="personchild1" >
insert into ......
</insert>
<!-- PERSON_CHILD2 -->
<typeAlias alias="personchild2" type="com.yah.nah.PersonChild2" />
<insert id="insertPersonChild2" parameterClass="personchild2" >
insert into ......
</insert>
<!-- PERSON_CHILD3 -->
<typeAlias alias="personchild3" type="com.yah.nah.PersonChild3" />
<insert id="insertPersonChild3" parameterClass="personchild3" >
insert into ......
</insert>
</sqlMap>
So is this legal to do with using many typeAliases and using parameterClass for 3 different domain classes as noted in the example ?
Also can the namespace be anything other than the actual domain you are acting on for example if the domain is Person can the namespace be Personer(just want to know if this is possible)?
please help.
Thanks!
Jason Hall