backrefs using ref name / annotations?

gmane <[email protected]>
Newsgroups gmane.comp.web.zope.plone.archetypes.general,gmane.comp.web.zope.plone.archetypes.devel
Message-ID <[email protected]>
Hello,

(crossposting - hopefully not inappropriately)

I need automatic back references (just two-way references, really), but 
would like to find a way to have them using stock AT ref fields & 
widgets (I have taken a look at ATBackRef product).

I thought of a mechanism hooked somewhere that would (ab)use 
ReferenceField "relationship" property: upon reference creation, the 
mechanism would see if the target has a ReferenceField whose 
relationship attribute has the same value as the source relationship, 
and then automatically add another reference, ie. from the target to the 
source. Are there any places where this kind of hooks can be registered btw?

I don't know if using relationships this way confuses the reference 
system somehow - what are the consequences? I read something about 
reference annotations - could they be used for this purpose somehow?

I guess there's an easy way, too - just add a field property 
"[relationshipname]_inverese" in the field that is to be used as the 
back reference?

Overall, perhaps this kind of automatic backref mechanism using stock AT 
fields & widgets would be useful enough to be added to Archetypes?

Thoughts?

Thanks,

  Petri



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.