Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the CollectiveAccess support forum! Here the developers and community answer questions related to use of the software. Please include the following information in every new issue posted here:

  1. Version of the software that is used, along with browser and version

  2. If the issue pertains to Providence, Pawtucket or both

  3. What steps you’ve taken to try to resolve the issue

  4. Screenshots demonstrating the issue

  5. The relevant sections of your installation profile or configuration including the codes and settings defined for your local elements.


If your question pertains to data import or export, please also include:

  1. Data sample

  2. Your mapping


Answers may be delayed for posts that do not include sufficient information.

Create relations entities ⇔ storage locations

Hello,

I would like to create some relations between entities and storage locations, for example:

  • Alice "has key of" Cabinet 12
  • Bob "has key of" Display case 3
  • Clara "is responsible for" Room 42

But in the relations' editor, I don't find such case!
No way to create a parent for this relations, related to ca_entities_x_storage_locations table?

Thank you!
Clovis.

Comments

  • Dear Clovis,

    Have a look inside Manage > Administration > Relationships. You’ll find per relation type all the values you already have, depending on the profile you’ve deployed. You can also add new relationship types from here.

    Best regards,

    Gautier
  • Dear Gautier,

    Of course, I tried Manage > Administration > Relationships, but I found no relation here between entities and storage locations. No root for this relationship.

    In my configuration, the only relationships concerning storage locations are with objects, lots, loans, occurrences, and objects' events.
    And there is no possibility to create a new root relationship in the UI. (Can create only child of a root.)

    After posting my first message, I found this page explaining this known problem: https://docs.collectiveaccess.org/wiki/Cookbook_Chapter_8:_Misc_Troubleshooting
    So I think I have to check that and may be create this root "by hand".

    Best regards,
    Clovis.

  • edited February 20

    So... For the other people that would have the same problem, here is the solution!
    I followed the procedure explained in the linked page, but I detail each steps:

    1) I look for the number of the concerned table in the datamodel.conf file. Table "ca_entities_x_storage_locations" is number 177.

    Then in phpmyadmin:
    2) I make a full backup of my database. :smile:

    3) I look for the table ca_relationship_types, I check that there is no entry for root_of_177. As there is no entry, I create the new entry by executing this SQL code:

    INSERT INTO `ca_relationship_types` (`parent_id`, `sub_type_left_id`, `sub_type_right_id`, `hier_left`, `hier_right`, `table_num`, `type_code`, `rank`, `is_default`) 
    VALUES (NULL,NULL,NULL,1.00000000000000000000,4294967296.00000000000000000000,177,'root_for_177',10,0);
    

    Then I go in CA, Manage > Administration > Relationships:
    4) I find is there is the new root for "relations entities ⇔ storage locations". Yes it is there, but without any child, and no possibility to select this root to create a child. (Because, as it is empty, there is not the ">" icon to select it!) :confused:

    5) So I create a child in another relation (for example: "relations entities ⇔ places").

    6) By using the hierarchical explorator, I choose Move to move this new child to the root of "relations entities ⇔ storage locations".

    7) And now, the ">" icon is here and I can create directly other relationships.

    Hope this will help! :smile:

    I have just one question: why the string "4294967296.00000000000000000000" is attributed to the "hier_right" parameter in the "ca_relationship_types" table? Is it a random number?

    Clovis.

Sign In or Register to comment.