Re: WORepetition
Re: WORepetition
- Subject: Re: WORepetition
- From: Art Isbell <email@hidden>
- Date: Thu, 24 Apr 2003 09:29:59 -1000
On Thursday, April 24, 2003, at 07:25 AM, A. Uchida wrote:
Table1: Quotes
dataID >> Customer.dataID (To many relation)
products
quantity
createdDate
salesperson
....
Table2 : Customer
dataID > Quotes.dataID(To one relation)
firstname
lastname
...
In WO, it's frequently more productive to think in terms of entities
and relationships rather than tables and primary and foreign keys
Entity1: Quote (I made the entity name singular because each object is
one quote.)
customers (to-many relationship)
products
quantity
createdDate
salesperson
....
Entity2: Customer
quote (to-one relationship - You can usually reduce the number of DB
accesses by making one of the reciprocal relationships not a class
property if you don't use it in your app.)
firstname
lastname
...
WORepetition1 (list: quoteDisplayGroup.displayObjects, item: aQuote) {
aQuote.dataID (If this primary key is a meaningless integer, it
should not be a class property and therefore should not be shown to the
user.)
aQuote.salesperson
I use a display group only when I want to take advantage of its object
batching feature which is rare. So there may be a way to use the
detail display group, customerDisplayGroup, in this repetition, but I
don't know how. For me, it's easier to follow the object graph.
WORepetition1's item, aQuote, is the parent object for WORepetition2,
and you want to display its customers, so:
WORepetition2 (list: aQuote.customers, item: aCustomer) {
aCustomer.firstname
aCustomer.lastname
aCustomer.address
}
aQuote.createdDate
...
}
Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >WORepetition (From: "A. Uchida" <email@hidden>) |