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 "Bolinger, Gregg D" <Gr...@intrustbank.com> on 2005/01/06 18:16:42 UTC
Insert complex properties
Reading the online docs I know how to map complex properties for
queries. But I couldn't find any information about inserting these
complex properties. For example, I have a class called Issues. Issues
looks like:
public class Issues
{
private Workstation workstation;
private Hardware hardware;
//Getters and setters here
}
Workstation and Hardware are both JavaBeans themselves that contain
getters and setters for an ID and their Name (workstation, hardware).
My Issues table in the database contains integer foreign keys for both
workstation and hardware.
So how do I map an insert to pull the ID from workstation and hardware
to be inserted into the Issue table? Thanks
Gregg
Re: Insert complex properties
Posted by Larry Meadors <la...@gmail.com>.
same way - workstation.propertyName, or hardware.propertyName
On Thu, 6 Jan 2005 11:16:42 -0600, Bolinger, Gregg D
<Gr...@intrustbank.com> wrote:
> So how do I map an insert to pull the ID from workstation and hardware to be
> inserted into the Issue table? Thanks