contrib icon indicating copy to clipboard operation
contrib copied to clipboard

Port request for Relation Module

Open serrato-dan opened this issue 5 years ago • 6 comments

Name of the module, theme, or layout Relation

Link to the drupal.org module, theme, or layout https://www.drupal.org/project/relation

(Optional) Link to an issue in the drupal.org queue asking the Drupal community if anyone is working on a Backdrop port of this project I did not find any information in the issue queue, but that's probably because Drupal is moving to replace Relation with Group and Dynamic Entity Reference for D8 and forward.

(Optional) Bounty At this time, I don't have any idea if we could provide bounty funds

serrato-dan avatar Nov 03 '20 19:11 serrato-dan

What is the difference between relation / references / entity reference modules in Drupal? And, have you looked into the reference module for backdrop and does it do what you need? If so, I would be interested in working on an upgrade path from relation -> reference.

jenlampton avatar Dec 24 '20 21:12 jenlampton

@jenlampton - I once used the relations module in Drupal 7, it's been a while. But, I think the selling point was that it creates a NEW entity links two other entity types together. It was my understanding at the time, that this gave us more flexibility in creating connections from either end. For example, if you have a class content type and and instructor content type. You can use the relations module to connect a class to a teacher OR a teacher to a class.

I don't think that is possible with the references module. I believe that with references, you can connect classes to teachers or teachers to classes, but you can't go both ways.

With the relations module, you have this new entity and can act upon that entity or add fields to the relation entity itself.

stpaultim avatar Dec 25 '20 21:12 stpaultim

That is correct. My example is that we use relation is so that we can connect and create relationships between people, and extend that relation to a third person. So, we have a teacher that has a mentor/coach. The coach will mentor several different teachers, independently. The teachers don't have any relation to one another. To extend that, we then have the Lead Coach that oversees the Coaches, and that translates down to the teachers. Lots and lots of relationships that are transitory.

Like family trees: Grandparent -> Parent ->-> Child A ->-> Child B

Because Child A is a related to the Parent, there is then a transitory connection to the Grandparent. These are all relations and can be queried, viewed, and connected in all sorts of ways.

Using entity references, you are just connecting maybe one node to another.

I have two projects in D7 that rely heavily on this and I was looking at the possibility of moving them to Backdrop given that Drupal is moving a different direction in this kind of area. I figured I would look into what it might take to delve into a conversion, but I'm going to assume this one might be pretty big to move.

Thank you for your consideration and beginning a conversation around this. Have a great weekend. Dan

serrato-dan avatar Dec 26 '20 14:12 serrato-dan

Thank you, these use-cases are very clearly explained. I agree that this needs to remain a separate project.

I wonder if the fields on the relation entity should be converted to the new reference fields? Perhaps not in the initial port, but at some point in the future. :)

jenlampton avatar Dec 28 '20 17:12 jenlampton

Once again, I'm running into a situation in which I think this module would be really useful. I can probably make do with references, but the relation module would be nice.

stpaultim avatar Oct 07 '24 08:10 stpaultim

I use a lot the references module and would use this relation module definitely.

robertgarrigos avatar Oct 09 '24 06:10 robertgarrigos