ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CRCVY <vikas.k.jad...@gmail.com>
Subject How to store composite object
Date Mon, 01 Feb 2010 05:04:55 GMT

Hi,

Can we store the composite objects using iBATIS.

e.g. consider the following tables.

employee (emp_id, name, department_id)
department(department_id, name, location)
project(project_id, name, client_name)
employee_project(emp_id, project_id)

One employee will belong to one and only one department and he/she can work
on multiple projects.

So, Employee been will be composed of employee information, department and
projects (assume each table has corresponding bean object).

e.g.

public class Employee {

Long emp_id;
String name;
Long department_id;

Department department;
List<Project> projects;

getters and seters here.....
}

My question is how can we save this composite object.

>From iBATIS documentation i understood how to map these objects. In single
query (using joins), we can retrieve this information. But can we do the
same while storing.

-- 
View this message in context: http://old.nabble.com/How-to-store-composite-object-tp27399760p27399760.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message