[OPEN-ILS-DEV] extending ofbiz entities

Bill Erickson erickson at esilibrary.com
Mon Aug 13 22:57:09 EDT 2007


Quick note after today's ACQ discussion.  OFBiz has a built-in ability to
extend pre-defined entities (objects).  Here's an example:

    <extend-entity entity-name="UserLogin">
        <field name="partyId" type="id"></field>
        <relation type="one" fk-name="USER_PARTY" rel-entity-name="Party">
            <key-map field-name="partyId"/>
        </relation>
    </extend-entity>

This is an example of the Party Manager extending the UserLogin object (from
the Security package) by adding a field called "party_id" to the user_login
table which points to the party_id field on the party table.  (Field names
and tables are lowercased and separated by underscores before they are are
sent to the DB).

This same functionality should make it trivial for us to extend key objects
with "where-ness" attributes - i.e. links to the actor.org_unit table which
will define the owner for a given object for permission checks.

-bill

-- 
Bill Erickson
Equinox Software, Inc.
erickson at esilibrary.com
http://esilibrary.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.georgialibraries.org/pipermail/open-ils-dev/attachments/20070813/1855dd25/attachment.html


More information about the Open-ils-dev mailing list