Franck Routier | 13 Apr 2010 12:31
Favicon

Re: Mananged many-to-one references

Hi,

this has been implemented in Simpleorm3, so you can do :

1) record.findReference(SFieldRefrence ref)

ie get a header from a line

2) dataset.queryReferencing(headerRecord, SFieldReference)

ie get a list of lines from a header.

Does it make sense to you ?

Franck

Le lundi 12 avril 2010 à 22:54 +0100, Mike Goodwin a écrit :
>   
> Hi,
> 
> I've had a browse through some of the past emails on this list and I
> noticed that managed many-to-one objects have been proposed before.
> The suggestion was to have a method findReferencing() . I cannot
> find* that email again, but the method was deemed unnecessary/too
> complicated. Perhaps I could get more explanation on why this is the
> case. I think I understand the DataSet/custom query issues, but I
> believe it is an important use case and should be handled.
> 
> My understanding is that it should be similar semantically to
> findReference(), except instead of returning a single value it should
> return a Set of values. If the DataSet is disconnected then an
> appropriate exception is thrown, stating that the data is not
> available. If a custom query is executed then the engine could
> optionally use the values already returned by findReferences (if it
> has been called), or more simply go to the database. Additionally it
> would be good if there was a method on SRecordInstance to fully
> resolve all of its dependencies recursively in one go.
> 
> In many use cases there is a hierarchy (for example Invoice->Items)
> and the entire hierarchy is of interest for all operations. So it
> would be nice if a managed many-to-one reference set object would
> manage updates. It seems to me that this is one of the most common use
> cases in an ORM framework and I am finding that I have to manage
> referencing entities manually.
> 
> thoughts and criticisms welcome!
> 
> - mike
> 
> * Actually it seems to me that yahoogroups is not publically
> searchable, which is unfortunate.
> 
> 
> 
> 

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/SimpleORM/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/SimpleORM/join
    (Yahoo! ID required)

<*> To change settings via email:
    SimpleORM-digest <at> yahoogroups.com 
    SimpleORM-fullfeatured <at> yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    SimpleORM-unsubscribe <at> yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/


Gmane