BiReference

Warning
This product has not had a release in over 1 year and may no longer be maintained.
by Dylan Jay last modified Feb 16, 2011 02:03 AM

Implements BiDirectional/Unidirectional references in Archetypes. Acts as a drop in replacement for ReferenceField and BackReferenceField and is perfect for self referential relationships.

Project Description

Purpose
-------
  Implements BiDirectional/Unidirectional references in Archetypes.
  Acts as a drop in replacement for ReferenceField and BackReferenceField
  and is perfect for self referential relationships.

Installation
------------

  unpack the archive into youe zope's Products dir
  install Archetypes + BiReference inside your portal with QuickInstaller

Usage
-----

- in your UML tool create a relation between 2 classes and make the 'to' end of the assoc
navigable (such a beast is provided in the sample dir). You can also point the referense
to the same class.

- set back_reference_field and reference_field to BiReferenceField (with appropriate imports tags)

- you will need to set the widget to BiReferenceWidget or a compatible reference widget
(see below)

- invoke ArchGenXML (version 1.2, at the date of the writing you must download it from svn.plone.org from the trunk)::

  python ArchGenXML/ArchGenXML --back-references-support ATBackRef/sample/atbackref.zuml BackRefSample

- restart your zope and try it out

- you will notice that references can be created at either end and are viewable at
  either end
 
Caveats - It won't work with many existing reference widgets such as PopupReferenceWidget.
Most reference widgets don't use the fields accessor to get the references and instead
assume they can get the references from the reference tool directly. It will work
with SearchReferenceWidget

Copyright, License, Author
--------------------------

  Copyright (c) 2007, PretaWeb, Australia,
   and the respective authors. All rights reserved.
 
  Author: Dylan Jay <software@pretaweb.com>

  License BSD-ish, see LICENSE.txt


Credits
-------
   Thanks to Phil Auerperg  at bluedynamics for ATBackRef which this is based on
  

Current Release
BiReference 0.1

Released Nov 07, 2007 — tested with Plone 2.5

Initial stable release
More about this release…

Download file Get BiReference for all platforms
BiReference.0.1.zip
If you are using Plone 3.2 or higher, you probably want to install this product with buildout. See our tutorial on installing add-on products with buildout for more information.

All Releases

Version Released Description Compatibility Licenses Status
0.1 Nov 07, 2007 Initial stable release More about this release…
Plone 2.5
ZPL final

Comments (0)