Questions tagged [relationships]

Relationships refer to mappings between elements of one set to another set, such as one-to-one, one-to-many, many-to-many.

Relationships can be implicit or explicit depending upon the data model.

Types of relationships

References

832 questions
-1
votes
1 answer

Relationships are created but not stored in embedded neo4j

I have a strange problem where I get to create relationships in embedded neo4j using createRelationshipTo() method. But when I use the getRelationships() method to access those relationships, no relationships are found. When I create a relationship…
Hamna
  • 3
  • 3
-1
votes
1 answer

How get additional fields in many-to-many relationships? yii2

Help me pls. I have tables: goods with fields: id int(11) name varchar(255) orders with fields: id int(11) status_id int(2) orders_goods with fields: id int(11) order_id int(11) good_id int(11) amount …
Ivan
  • 1
  • 2
-1
votes
1 answer

Laravel 5.5 How to get all models related to model?

I have model User that has relationship with itself public function subscription() { return $this->belongsToMany('App\User', 'subscription', 'subscriber_id'); } that I made for making users subscribe to each other. I made pivot table with 2…
mile-panic
  • 135
  • 2
  • 8
-1
votes
1 answer

How can I do this join-table with Eloquent Relationships?

Purpose I would like to get the total of mutual interests between all users referring to a single user, using Eloquent Relationships instead of Query Builder directly. Table structure users +----+--------+ | id | name | +----+--------+ | 1 | John…
-1
votes
1 answer

Linking between 2 tables laravel

I got two tables: "products" and "productPhotos". Each product has an unique id = Product_ID. Each productPhoto has an unique id = ProductPhoto_ID. In my table productPhoto there is also photo and this is specified like so in my migration:…
Wesley
  • 83
  • 2
  • 9
-1
votes
2 answers

Neo4J RelationShips MERGE ONCREATE ONMATCH

Is there a solution to distinct ON CREATE and ON MATCH on relationship MERGE ? For example : USING PERIODIC COMMIT 10000 LOAD CSV WITH HEADERS FROM 'http://ip/myfile.csv' AS row MATCH (source:Ticket {Id: toInt(row.idticket)}) MATCH (target:User…
Amos
  • 45
  • 7
-1
votes
3 answers

Get the user name based on the id in Laravel

i'm trying to show a first name of a user, but i just have a user's id. My relationships are: //TypeCost public function user() { return $this->hasMany('User'); } //User public function type_cost() { …
Miguel Marroquin
  • 129
  • 1
  • 3
  • 10
-1
votes
1 answer

Neo4j: Create slef relation cypher query

I have big number of EmpBase imprted (from csv file from postgreSQL )nodes like: neo4j-sh (?)$ match (e:EmpBase) return e limit 10; +-------------------------------------------------------------------------+ | e …
Szczepan
  • 63
  • 9
-1
votes
1 answer

Laravel 4 eloquent relationsips

I have three models: Category, Company and Product. Category id, name Company id, category_id, name Product id, company_id, name I want to get all products with company and category of this company. So, for ex.: Guitar from RainSong which…
fronterace
  • 31
  • 2
  • 3
-1
votes
1 answer

Relationships in Rails

I have models like this: app/models/user.rb class User < ActiveRecord::Base has_many :questions has_many :answers, :through => :questions end app/models/question.rb class Question < ActiveRecord::Base has_many :answers has_many :users…
vrajb55
  • 131
  • 11
-1
votes
2 answers

Java Has-a relationship with List

So im trying to get my head round the has-a relationship between classes and Id like some help with one instance: public class Test{ List list; } Is this Test has-a List or Test has-a List<> or Test has-a ObjectA or Test has-a List<> and…
-2
votes
1 answer

Symfony, how get current user (FOS) in entity, unused __construct()?

I have an entity Book. Title of this Book is stored in different languages ​​(the entity Book is associated with BookTranslates as OneToMane). The entity Book is used as a form field in several places (like select). For this, I need to set…
-2
votes
1 answer

What tool was used to create this rails relationship erd diagram?

I have look at the Rails docs and would like to use the same tool to create a relationship diagram like this. does anyone know the tool that was used? rails erd relationship diagram
-2
votes
1 answer

mysql how to sort based on relationship field

i stumbled the following problem that i cannot solve i have the following table in the database CREATE TABLE `departments` ( `Company` int(11) NOT NULL, `Department` varchar(32) NOT NULL, `DepartmentName` varchar(40) NOT NULL, …
Stav
  • 3
  • 2
-2
votes
1 answer

Neo4J - Return Node Name instead of ID

I would like to know how I can return the node names instead of the node IDs in the Java console. The following output is shown in the console: The desired output should look like: Just without all the information but only with the Node names…
Eto
  • 27
  • 1
  • 7
1 2 3
55
56