Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity References #27

Open
CsarRamos opened this issue Dec 29, 2022 · 7 comments · Fixed by #28
Open

Entity References #27

CsarRamos opened this issue Dec 29, 2022 · 7 comments · Fixed by #28
Labels
enhancement New feature or request status:needs work There is code, but it needs additional work before it should be reviewed

Comments

@CsarRamos
Copy link
Contributor

Hello,

Using searchkit, it seems that the resource entities are not linked to the core entities. have you detected this? Maybe searchkit can't handle these joins, I see this is because DAO files are using dynamic foreign keys. I'm not sure if this would be a new enhancement to searchkit or is not posible.

Thanks,

@bjendres
Copy link
Member

bjendres commented Jan 2, 2023

Yes, this is a very loose link as it allows linking to any other entity.

This probably "only" needs to be expressed differently in the XML/DAO, for APIv4 to pick it up correctly.

Any chance you could provide a PR?

@bjendres bjendres added the enhancement New feature or request label Jan 2, 2023
@Fabian-SYSTOPIA
Copy link
Contributor

There are plans to create an custom "Entity Reference" field type.
This field could then be used to link custom entities to other (core) entities and use these links in CiviCRMs search kit.

By the way even know you should already be able to create a custom contact reference field for a custom entity and use the link to the contact's data in search kit. This may however not work for all purposes but I have used it to create custom formss (using form builder) and show custom entities in a contact view using the contact layout editor.

@CsarRamos
Copy link
Contributor Author

Thanks @bjendres @Fabian-SYSTOPIA, it sounds like an interesting approach that would improve the funcionality considerably. We would like to work with the event class in search kit and resoure demands, I have created a pr to propose a change in the demand class to give the same functionality as the resource class. #28

@Fabian-SYSTOPIA
Copy link
Contributor

Thanks @CsarRamos - maybe @jensschuppe could have a look at this after he is back from his holidays?!

@bjendres bjendres added the feature this issue represents a completely new feature label Jan 4, 2023
@jensschuppe jensschuppe linked a pull request Feb 16, 2023 that will close this issue
@jensschuppe
Copy link
Contributor

@CsarRamos would you be able to provide a PR for the Resource entity as well, now that #28 is merged for the ResourceDemand entity?

@jensschuppe jensschuppe removed the feature this issue represents a completely new feature label Feb 21, 2023
@jensschuppe jensschuppe changed the title Question: Entity References Entity References Feb 21, 2023
@jensschuppe
Copy link
Contributor

Reopening for implementation for Resource class.

@jensschuppe jensschuppe reopened this Feb 21, 2023
@CsarRamos
Copy link
Contributor Author

CsarRamos commented Feb 22, 2023

@CsarRamos would you be able to provide a PR for the Resource entity as well, now that #28 is merged for the ResourceDemand entity?

Hi, great, thank you for the merge. I will check it and try to adapt Resource class following the same approach, I will let you know when I have news, cheers.

@jensschuppe jensschuppe added the status:needs work There is code, but it needs additional work before it should be reviewed label Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request status:needs work There is code, but it needs additional work before it should be reviewed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants