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…
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 …
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…
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…
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:…
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…
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()
{
…
I have big number of EmpBase imprted (from csv file from postgreSQL )nodes like:
neo4j-sh (?)$ match (e:EmpBase) return e limit 10;
+-------------------------------------------------------------------------+
| e …
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…
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…
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…
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…
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
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,
…
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…