db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob Braeuchi (JIRA)" <j...@apache.org>
Subject [jira] Created: (OJB-79) Additional Reference/Relationship Filters
Date Sun, 27 Nov 2005 10:06:55 GMT
Additional Reference/Relationship Filters

         Key: OJB-79
         URL: http://issues.apache.org/jira/browse/OJB-79
     Project: OJB
        Type: New Feature
  Components: PB-API  
    Versions: 1.0.x CVS, 1.1 CVS    
    Reporter: Jakob Braeuchi
    Priority: Minor

I have run into a couple of scenarios where it would be extremely
helpful to be able to add additional criteria to a reference descriptor.

For instance, you might have a Person object with a collection of
Addresses on them. Address might have a property called "Primary". In
your query, you might want to be able to qualify to use the primary
address. The current way to do that is to keep a foreign key on your
person table that links back to the primacy address object, and update
that when your primacy address changes. So, you have both a property on
your object, and a db column.

It would be nice if you could still have that reference descriptor for
your person object for a Primary Address, but not maintain the foreign
key in the db, just had a certain criteria to the descriptor that
filters it to the appropriate one.

For instance:

	<foreignkey field-ref="personPK"/>
	<foreignkey-filter value="is_primary=1"/>

Does that make sense? Just curious if this has ever been discussed.



see also:

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org

View raw message