-
May 17th, 2010, 09:22 AM
#1
JDBC Template Design question
Hi all,
I have the following situation:
2 tables
Costumer and Contract
Contract need to have 2 costumers references, like this:
Contract
id
description
costumer_seller_id
costumer_buyer_id
I'm using JDBC template to load data from database.
If I need to load a Contract, I have Contract object that have getBuyer() and getSeller() methods.
To load buyer/seller I will have to do 2 queries to load my Contract object?
Is that correct?
Is there other way to do it?
Important: I can't use JPA on my project, that's why I'm using JDBCTemplate.
Regards,
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules