Score:0

Entity reference to another instance of the same type

ai flag

Let's say we have a custom thing entity type, and we want to have a custom related_thing field in the entity which describes a relationship of some sort with other things. The custom field has several properties, indicating the nature of the relationship, when the relationship was recorded, who recorded it, and an entity reference to the other thing. As far as I can tell, Drupal won't allow setting the target_type of the entity_reference property in the propertyDefinitions() method, as long as the custom field is being defined in the module in which the custom thing entity type is created, right? So is the only way to get around this circular dependency problem to have a second custom module which depends on the module where thing is defined, and creates the custom related_thing field, and then modifies the thing entity type in a hook, adding the custom field?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.