[fdo-users] RE: Object and Association Support

Brent Robinson brent.robinson at autodesk.com
Fri Jul 23 08:05:54 EDT 2010

Hi Crispin,

The main difference would be that Association Properties would be for general relationships between classes while Object Properties represent parent-child relationships where the parent effectively owns the child objects. An Object Property is essentially an ADT property. 

For the FDO API there is a difference in how each can be accessed. Object Property values can only be retrieved through their owning features. For example if you have Class A with object property B with object property class C, then you have to read through the Class A features, and for each one, get the property B values via GetFeatureObject. However, if you do a select directly on Class C, you probably won't see any of the property B values. If Class A has an association property B to Class C, then a select on Class C will retrieve features related to Class A. 

There are a number of different Object Property types:

    Value - each parent feature can have at most one object property value
    Collection - feature can have multiple values.
    Ordered Collection - same as collection except that reader must retrieve values ordered by a 
         Specified sub-property in the object property.

A value type object property can be null. I'm not sure about collection object properties, whether they
are considered to be null if the collection is empty.

> For datastores without this MetaData, an association property is generated
> for each foreign key present; but no object properties are generated

For these native datastores, there are no object property definitions at all in the feature schemas generated by the provider. Some RDBMS's support ADT's so these could potentially be reverse-engineered into object properties but we haven't gotten that far yet. 


-----Original Message-----
From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Crispin_at_1Spatial
Sent: Friday, July 23, 2010 3:16 AM
To: fdo-users at lists.osgeo.org
Subject: [fdo-users] RE: Object and Association Support

Thanks Brent - very helpful.

So what are the architectural / compelling differences between the two?

At first glance it appears that Associations have flexible cardinality (1:1
or 1:n - or 1:n depending on the rules?) and options for cascade delete and
objects are simply a more complex attribute

Is it true that object properties are therefore forced at 1:1?  If so, I
assume the a FeatureReader for the object will just return one 'row'.  Can
this be nullable... I need to look at some practical examples, though I had
hoped to be able to do this independent of a RDBMS - ie with SQLite (but not
supported (yet!)).

The following fragment lost me:
Is the statement true for all cases or only when the "ReverseMultiplicity"
is set to TRUE?
It looks as though (through exposed by the FDOToolbox Schema Editor) an
ObjectProperty cannot be set to null - so this is implied , where the
identity property does not exist then the FeatureReader will have nothing in

Brent Robinson wrote:
> For datastores without this MetaData, an association property is generated
> for each foreign key present; but no object properties are generated

Thanks for the response - I hope this gains more popularity through
understanding (and the current issue of limited support by FDO clients).


View this message in context: http://osgeo-org.1803224.n2.nabble.com/Object-and-Association-Support-tp5325810p5328621.html
Sent from the FDO Users mailing list archive at Nabble.com.
fdo-users mailing list
fdo-users at lists.osgeo.org

More information about the fdo-users mailing list