In BaseCcsCouponPeer should be a doSelectJoinCcsMember() method. The other way 
around is not implemented. So you need to program it yourself, I think. The 
member doesn't know about the coupons, so it isn't possible to build 
automatically a doSelectJoinCcsCoupons. Additionally in MemberPeer you try to 
SELECT a member and add multiple coupons to it. This isn't easy with a single 
SELECT. (because the member has multiple coupons and you'll get multiple rows 
for one member).

You could make two selects. First get the CcsMember and then call 
CcsMember.getCoupons(). This method is implemented in BaseCcsMember.


> -----Ursprüngliche Nachricht-----
> Von: brycenesbitt [mailto:[EMAIL PROTECTED] 
> Gesendet: Dienstag, 14. August 2007 10:14
> An: [email protected]
> Betreff: Re: AW: AW: foreign-key generation maps NumberKey to 
> int, and code fails to compile
> 
> 
> 
> Each coupon is owned by one member.
> A member may have any number of coupons.
> SQL has no trouble setting up such a relationship without a 
> third table.  Do I need the third table to satisfy Torque?
> 
> 
> Thoralf Rickert wrote:
> > 
> > Ah, okay, a coupon has only one member. Is it possible to have a 
> > member that has multiple coupons? Or is it a 1:1 relation? 
> If so, you 
> > could make a circle reference from member to coupon. If it is 1:n 
> > relation (I think so), then you should add a third table 
> > COUPON_MEMBER_RELATION with member_id,coupon_id as foreign keys and 
> > unique(member_id,coupon_id) and maybe unique(coupon_id).
> > 
> > bye
> > Thoralf
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/foreign-key-generation-maps-NumberKey-to
-int%2C-and-code-fails-to-compile-tf4265600.html#a12140496
Sent from the Apache DB - Torque Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to