164 Posts
redback
8 years ago
5
Topic

Hi Professionals, 

i`m looking for a solution for a many to many relationship made in Seblod. Would be happy about some ideas. 

Example: Relationship between people 

There a two tables:
1. Joomla default article table (#__content)
2. Custom table managing the relations of the article table (#__relations) 

Data in #__content
article_id, name
1, Max
2, Steve
3, Chris
4, Jenifer
5, Tobias 

Data in #__relations
1, 2, 3 (Steve <--> Chris)
2, 3, 5 (Chris <--> Tobias)
3, 1, 5 (Max <--> Tobias)
4, 1, 3 (Max <--> Chris)
5, 5, 4 (Tobias <--> Jenifer) 

Note: There a no double relations like "2, 5, 3 (Tobias <--> Chris)" because "2, 3, 5 (Chris <--> Tobias)" already exist. 

Goal: Show as result related to the article page "Chris", all related article (Persons). 

Result by "Chris" => Steve - Tobias - Max

I m happy about your ideas

Best

Get a VIP membership
233 Posts
pepperstreet
8 years ago
0
Level 1

Just following... 

(BTW, where is the bookmark feature?)

4229 Posts
Kadministrator
8 years ago
2
Level 1

Hi,

In any case you will need to partially construct this query yourself, I think -it depends how you plan to show this relations. If you will do it as nested list (using seblod list field or module), then you can use http://www.seblod.com/store/extensions/19162 and use value from your #__content table as live value with with any exact matching and do a search on articles content type. Or you could use http://www.seblod.com/store/extensions/19157 in append mode to add necessary selects and/or you can combine it with http://www.seblod.com/store/extensions/922

164 Posts
redback
8 years ago
1
Level 2

Hello Klas,

thanks for you spectacular short answer with so many detailed information. 

I confirm it works very well. Many to Many is really possible with Seblod. I took the way number 1:

If you will do it as nested list (using seblod list field or module), then you can use http://www.seblod.com/store/extensions/19162 and use value from your #__content table as live value with with any exact matching and do a search on articles content type.

Best

1283 Posts
Bucklash
8 years ago
0
Level 3

Hi

This juicy little post would class as 2 for the one a week tutorial challenge in June ;)

8 years ago
0
Level 1

Hi

For this we developped the JoinN2N plugin as described here (sorry it's in French, you will have to googleTranslate it )

cyril

Get a VIP membership