ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kai Grabfelder <nos...@kinokai.de>
Subject Re: help ! please !!!!
Date Tue, 21 Oct 2008 16:21:00 GMT
ibatis can't handle this automatically for you. If you don't want to write the loop in your
dao layer by
yourself I guess you need to switch to JPA / Hibernate.

Regards

Kai

--- Original Nachricht ---
Absender: pablo_1561719009@hotmail.com
Datum: 21.10.2008 19:08
> i have the followin object graph !!!!!!
> 
> class Persona {
>     int id_per;
>     String name;
>     List<Domicilio> domi;
> }
> 
> class Domicilio {
>     int id_per;
>     int id_domi;
>     String street;
>     .... etc... some other propertis
> }
> 
> it is posible for example code ?
> 
> Persona p = new Persona(1,"pepe")
> 
> p.getDomicilios().add( new Domicilio( 1, 100, "av. xxxx 1");
> p.getDomicilios().add( new Domicilio( 1, 101, "av. xxxx 2");
> p.getDomicilios().add( new Domicilio( 1, 102, "av. xxxx 3");
> 
> daoPersona.insert(p)  //This dao insert data into persona and domicilio ... ( i and need
this functionality )
> 
> it is posible Ibatis insert related data automaticaly or how to code the ibatis maps
for this use case ?
> 
> HOW TO CONSTRUCT INSERT FOR TOW TABLES ?
> 
> Sorry muy english y too more basic,,, im spanish... thanks .....
> 
> 
> 
> 


Mime
View raw message