Relationship between Objects

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
wings
Posts: 133
Joined: Mon Oct 20, 2008 7:59 am
Location: Australia

Relationship between Objects

Post by wings »

We have an object that contains 'Properties'

We also have an object that contains 'Names'

There is a many to many relationship between 'Names' and 'Properties' our problem is that we want to record the type of relationship between the two objects.

eg A 'Name' can Own a 'Property'
A 'Name' can Rent a 'Property'

How can I define this relationship in aware and record either Own or Rent as an attibute of that relationship.
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

wings,

You could make another BO NameAndProperty that has a peer relationship (not multiple allowed) with both Names and Properties. You can also have a plain text attribute in NameAndProperty that defines the relationship between the chosen Name and Property (own, rent, etc). If you also create matching relationships for each NameAndProperty in Name and Properties, you will be able to shortcut the needed attributes.

Tom
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

If you also create matching relationships for each NameAndProperty in Name and Properties, you will be able to shortcut the needed attributes.
Oops -- I should have said that the matching attributes created in Names and Properties will be multiple allowed. For each instance of Names, you will then be able to see the various Properties and the relationship to each. For each instance of Properties, you will be able to see the various Names and the relationship to each.

Shortcuts won't work since it's a multiple allowed.

Tom
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Something is badly wrong in your design if you want things like these. "Name" and "Property" objects (note the singular form!!) are very generic. Please tell us more about your design and what you need these for. We may suggest an alternative design.

BTW, everyone, always name your objects in a singular form!
Aware IM Support Team
wings
Posts: 133
Joined: Mon Oct 20, 2008 7:59 am
Location: Australia

Post by wings »

Thanks Tom for your help it works fine now.

What we did was:

We have a 'Name' business object and a 'Property' Business object
There is a relationshhip where a 'Name' can own one or more 'Property' and a property can be owned by one or more 'Name'

We then defined a new 'PropertyName' business object which is a normalisation of this many to many relationship. We put a relationship attribute on 'PropertyName' to record either the 'Owner' or 'Occupier' relationship between the 'Name' and the 'Property'

The 'Name' attribute on 'PropertyName' is defined as 'Peer' to 'Property' with out multiples allowed.

The 'Property' attribute on 'PropertyName' is defined as 'Peer' to 'Name' with out multiples allowed.
wings
Posts: 133
Joined: Mon Oct 20, 2008 7:59 am
Location: Australia

Post by wings »

aware_support

Please see our previous reply to Tom

If you still think this is bad design, please advise us of a preferred method for defining attribute(s) on relationships between business objects.

eg: Our scenario where it is a : 1 to many to 1
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Type of a relationship in your context is a business concept, not a configuration concept as you made it in your design. Therefore, this type should be part of a business object, not a part of a rather obscure and generic NameProperty object.

We can only speak very generically here, since we don't know all the details of your design. Anyway, if it works for you now...[/u]
Aware IM Support Team
Post Reply