I'm trying to work my way through your mapping....

Why not just link the page directly to a specific text? How come you
need all the messing about with products and page numbers?

Mark

On Thu, Dec 18, 2008 at 3:23 AM, Ken Cummins <[email protected]> wrote:
>
> Gah!  Yet again, I post before my coffee activates...
>
> The link for the example object *should* be:
>
> <link column="productkey" to="Products.Text" />
>
> The idea is that the text objects are part of a o2m relationship with
> the product, but that also reference the pageno.  Now, I'd like to
> have a o2m relationship from product to page, then another o2m
> relationship from page to text. This will be extended to other objects
> as well.
>
> Would I be better off scrapping the direct o2m product to text, and
> adding a function into the decorator? Or can I get transfer to handle
> the complex data modelling?
>
> Ken
>
> On Dec 17, 10:02 am, Ken Cummins <[email protected]> wrote:
>> I'm looking (still) at a table with a compositeid that I want to be
>> the parent of a onetomany relationship. I am considering using one
>> portion of the compositekey as the o2m key, and adding a condition to
>> filter it to the second part of the key.
>>
>> My question (and this is without a lengthy bout of of my usual test/
>> alter/test/alter/test/try to remember where I was/alter several things/
>> test/wish I had backed things up/drink more coffee cycle) is if I can
>> reference the current object in my where clause.  i.e.:
>>
>> <object name="page" table="productpages" decorator="BaseDecorator">
>>         <compositeid>
>>                 <parentonetomany class="Products.Product" />
>>                 <property name="pageno" />
>>         </compositeid>
>>         <property name="stylekey" type="numeric" />
>>         <onetomany name="text" lazy="true">
>>                 <link column="productkey" to="Products.Product" />
>>                 <collection type="array">
>>                         <condition where="pageno = {pageno}"/>
>>                         <order property="textno" />
>>                 </collection>
>>         </onetomany>
>> </object>
>>
>> This also brings up the problem of using the key for a o2m child as
>> part of the o2m parent relationship...  Grrr...
>>
>> Ken
> >
>



-- 
E: [email protected]
W: www.compoundtheory.com

--~--~---------~--~----~------------~-------~--~----~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to