New Posts New Posts RSS Feed: Span Query and many to many relationship
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Span Query and many to many relationship

 Post Reply Post Reply
Author
DataMan View Drop Down
Groupie
Groupie
Avatar

Joined: 26-Jul-2007
Location: Canada
Posts: 52
Post Options Post Options   Quote DataMan Quote  Post ReplyReply Direct Link To This Post Topic: Span Query and many to many relationship
    Posted: 04-Jul-2008 at 8:01am

Hi there,

I've created a many to many relationship for two of my objects let's say Salesperson to Customers through Orders.

When I create a devExpress report based on a span query the records on a certain sales person I can't create the span between Salesperson to Customers because when I type in EntityRelations. the intellisense does not see my many to many relation.
 
Is it as easy as adding the many to many relationship to the EntityRelations collection and if so how do you do that?
 
Thanks
Jaydel
 


Edited by DataMan - 07-Jul-2008 at 9:40am
Back to Top
DataMan View Drop Down
Groupie
Groupie
Avatar

Joined: 26-Jul-2007
Location: Canada
Posts: 52
Post Options Post Options   Quote DataMan Quote  Post ReplyReply Direct Link To This Post Posted: 07-Jul-2008 at 9:40am
I've answered my own question when looking deeper into my Many to Many relationship.  When I created the relationship I used the wrong direction of relationship in the parameter.  When I fixed that direction I put back in the code for the span and it worked then.
 
You simply have to add any relations required to create the many to many join and the span will show the proper data.
 
 
Back to Top
GregD View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 374
Post Options Post Options   Quote GregD Quote  Post ReplyReply Direct Link To This Post Posted: 07-Jul-2008 at 11:19am
>>
I've answered my own question when looking deeper into my Many to Many relationship.  When I created the relationship I used the wrong direction of relationship in the parameter.  When I fixed that direction I put back in the code for the span and it worked then.
 
You simply have to add any relations required to create the many to many join and the span will show the proper data.
<<
 
Sounds like you've got it, but just to be sure:  Any many-to-many relation is the result of two one-to-manys joined at the many side (i.e., 1-M-M-1).  For example, if you have a one-to-many relation between Customers and Orders and a one-to-many between SalesReps and Orders, then you have, implicitly, a many-to-many relation between Customers and Employees. A query for Customers could have a span that navigates from Customers to Orders and then from Orders to Employees. You shouldn't have to add any relation objects to do this, assuming that you have a relation object for each of the one-to-manys.
 
Greg Dunn
IdeaBlade
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down