Posted By:
Gnanasekaran_Sakthivel
Posted On:
Sunday, May 18, 2008 05:39 PM
Example: Association between Item and Bid classes.
Bid contains a reference to Item.
public class Item {
Integer itemId;
String name;
}
Approach 1:
public class Bid {
Integer bidId;
Item item;
ETC
}
Approach 2:
public class Bid {
Integer bidId;
Integer itemId;
ETC
}
I just would like to see the pros and cons of these two approaches.
Thank you guys