6,470 questions
-2
votes
0
answers
57
views
Get latest entries/posts from categories on many to many relationship Laravel [duplicate]
I have a small laravel project with posts and categories and a many to many relationship
public function post_categories(): BelongsToMany
{
return $this->belongsToMany(PostCategory::...
0
votes
1
answer
67
views
What relationship should be used
I have a table (product) as follows which holds product related data
@Entity
@Table(name = "product")
public class ProductEntity {
@Id
@GeneratedValue(strategy = GenerationType....
0
votes
1
answer
139
views
Strapi v5: Relations not populating in API responses despite correct configuration
Problem
I'm using Strapi v5 with SQLite database. My Wine content type has many-to-one relations to Category and Region, but these relations are never populated in API responses, regardless of the ...
0
votes
0
answers
59
views
Filament Forms Select createOption relations
I get an error if my createOptionForm (in a Filament Form Select) has a Select with a 'relationship' definition instead of an options definition.
I get the same issue using a Fieldset (in the ...
0
votes
2
answers
78
views
Is it possible to combine collections in Eloquent relationships in Laravel?
I have a query that can get data on 3 relationships as a result: Relationship1, Relationship2 and Relationship3. But the problem is that in some cases, there may be fewer of these relationships. Tell ...
0
votes
2
answers
365
views
Laravel Filament, how to pass parameters to Relation Manager?
Laravel Filament. I have an EditRecord class with Relation Managers. I need to pass some data to this Relation Manager. How to do this?
<?php
class EditContent extends EditRecord
{
public $...
2
votes
0
answers
23
views
Power BI Many to Many relationship with vessels issue
I have a table which has VesselPositions for every insured ship. Everyday new data is added for the vessel.
In that Table I have a column named: IMO, Longitutude, Latitude, VesselPositionDate.
I also ...
1
vote
1
answer
39
views
How to create custom relationships between CI Types in UCMDB
I've two custom CI Types(for example: Test1 and Test2) under Node CI Type, I want to create custom relationship between them, How can I do that?
I tried creating relationship from CMS UI but I couldn'...
1
vote
0
answers
51
views
Laravel MongoDB delete EmbedOne relation
My Model:
use MongoDB\Laravel\Eloquent\Model;
use MongoDB\Laravel\Relations\EmbedsOne;
class TextContent extends Model {
public function lock(): EmbedsOne
{
return $this->embedsOne ...
0
votes
0
answers
97
views
How to fix `InvalidRequestError: Can't attach instance <ClassName at 0x7baada2f3cb0>` in SQLAlchemy relationships?
I have already gone through quite a few answers on SO (eg. this one and this one, but none of them seem to work for me.
I am using SQLAlchemy with sqlite, python 3.13.3. In case it matters, this is ...
1
vote
1
answer
51
views
Not showing results from a get_posts meta_query using ACF Relationship field
I am trying to show related services through my single-services.php template. I have used the ACF relationship field. When I print_r the field data, it all works. However, when I try to call specific ...
0
votes
0
answers
42
views
Print peewee model as json with foreign_keys instead of related model
I'm currently exploring peewee ORM and in order to make some tests I've defined two simple databases with three tables as follow
I then defined the peewee models into a single file
from playhouse....
2
votes
5
answers
204
views
Laravel 9, Parent child bulk insert while replacing uuid to id
I have following table structure.
Table: movies
id
uuid
title
...
1
uuid-m01
movie 1
...
Table: categories
id
uuid
title
...
1
uuid-c01
category 1
...
2
uuid-c02
category 2
...
Table: movie_categories
...
0
votes
1
answer
48
views
Laravel conditional belongsToMany relationship
I have a method tenants() inside the User model, now inside this method it returns like this below which is working fine,
return $this->belongsToMany(
Municipality::class,
'...
0
votes
2
answers
51
views
Laravel morph child relationship eager loading
We have a few tables related as such:
Mission is our main table (has two columns for morph relation to the next tables: modality_type and modality_id)
Then we have various tables which contain meta ...
0
votes
0
answers
39
views
How to calculate received and completed tasks according to month/date range in Power BI
I have multiple tasks table and have do relationship to link to my Unique Date Table (date purpose) and dORSID table (Each unique agent)
All tasks table relationship to my Date table and dORSID table
...
0
votes
1
answer
81
views
RealmSwift: Appending List in One-to-many-Relationship
There are the two following classes with an One-to-many-Relationship between in my App:
class Lesson: Object, Identifiable {
@Persisted(primaryKey: true) var id: ObjectId
@Persisted var name: ...
1
vote
0
answers
58
views
Best way to declare sqlalchemy tables
Using SqlAlchemy 1.4, in a FastAPI application, I have the need to import all the models before doing Base.metadata.create_all(). There are many tables with multiple relatinoships.
How should I do to ...
0
votes
1
answer
70
views
Efficient way to flatten account hierarchy so that parents of each child node is displayed in adjacent columns?
This hierarchy has several top level parent nodes which roll down into children nodes which roll down into varying levels of depth containing deeper level children nodes. The level in which a node ...
0
votes
1
answer
44
views
Laravel withCount elements in related and subrealted table
I'm building application with Laravel, Inertiajs and Vue3.
There are three key tables in application: Operators, Locations and Terminals. Terminals belongs to Locations and Locations belongs to ...
1
vote
0
answers
53
views
Power BI Fact Tables Joined by Dim Tables
I have two fact tables:
a) FACT_PURCHASE_ORDERS fields:
-PO_Number
-Pick Ticket Number
-PO_Line_Number (po can have many line numbers)
-PO_ITEM (PO_number concatenated with PO_Line_Number ...
-1
votes
1
answer
72
views
Swift core data variable number of relationships with tag on relationship
I am trying to build a graph of words, where each word has a relationship to each word with the same letters plus one, like for example :
table -> ablate, cablet, tabled, gablet, albeit, albite, ...
0
votes
2
answers
143
views
Neo4j query to filter out paths with specific relationship property using apoc.path.expandConfig
I have a use case where I want to filter the paths retrieved from apoc.path.expandConfig based on a relationship property. Below is my current query:
WITH source, candidates, exits, typesFilter
// Use ...
0
votes
0
answers
30
views
Laravel Excel Import: Store Specific Columns in Related Table and Reference ID in Another Table?
Hello Stack Overflow community,
I'm working on a Laravel 11 project where I need to import data from an Excel file. The file contains multiple columns, and I need to store specific columns (Numero BL, ...
0
votes
1
answer
18
views
How to find the relationship between resouces in AWS?
Does any api or method to get an account's resources and the relationship between them on AWS?
0
votes
1
answer
45
views
How to add Columns from Junction table to the Child
I am working with Spring Boot JPA Hibernate.
I have @ManyToMany relationship and Junction Table.
One Entity is called Entity and the other Button.
And then Junction Table is called ENTITY_BUTTONS
This ...
0
votes
1
answer
423
views
Using a Select filament field with dynamic multiple, when is false can't keep relationship to belongstomany
I have this code that handles clients on a treatment, the relation between this model is a belongstomany, when the device is single the multiple property on client select is false, and when is grupal ...
0
votes
2
answers
215
views
How to create hasOne relationship from hasMany but with conditions?
I am trying to create a HasOne relationship out of HasMany relationship but with added conditions.
These are my models
Document.php
class Document extends Model
{
public function approvals(): ...
1
vote
2
answers
906
views
Strapi v5 populating relations
In Strapi v5 I've got these linked collection types, all many-to-many: patients, allergies, comorbidities, prescriptions. This all works perfectly well in the admin area. I view a patient: there are ...
0
votes
1
answer
96
views
What is the right way to get data from related tables using an entity and business models separately in ASP.NET Core Web API?
I have a BookEntity and my domain Book model:
public class BookEntity
{
[Key]
public Guid BookId { get; set; }
public string Title { get; set; } = string.Empty;
public string ...
0
votes
1
answer
57
views
Create middle nodes on all interrelated other nodes
I'm having some troubles on creating a relationship-based program, what I need is to create a function to aggregate related nodes together, like this, if I have those 4 nodes:
A
B
C
D
If A -> B, ...
0
votes
1
answer
38
views
How to obtain fact data?
I have a model like the one in the picture where the arrows indicate the direction of the filter. I am trying to get the data from my fact tables so that, given a range of dates (which I get through a ...
0
votes
2
answers
62
views
Laravel Eloquent: Excluding Titles with Quizzes or Contests While Including Those with Practices
I'm working on a Laravel application and I need help with filtering titles based on their relationships with practices, quizzes, and contests. Specifically, I want to retrieve titles that have ...
0
votes
0
answers
60
views
SQLAlchemy relationships
How to properly do the relation like 'one user has many friends'?
I did it like this, but do not know whether it is a bad code / approach. Maybe it's better to save just ID's of friends? Thank you!
...
0
votes
1
answer
45
views
Retrieve Only Specified Roles for Users Within Each Team in Laravel
I'm implementing a roles and permissions system that includes both team-specific and user-specific roles. I need to list all teams a user belongs to, along with the roles assigned to the user within ...
0
votes
0
answers
43
views
Need help summarising data at asset level while also evaluating at blockgroup level too
I have a table of assets which belong to blockgroups which belong to stations. Assets<Blockgroup<Station. I'm trying to filter the table down to a smaller asset list based on some conditions. A ...
0
votes
1
answer
391
views
Can I use OR condition with Relationships in Tableau
I have 2 tables in tableau & I want to create a many to many relationship between them based on an OR condition between fields. So I basically want either the account name or the parent account ...
3
votes
2
answers
146
views
PostgreSQL zero-or-one to zero-or-one relationship
As the title describes I want to have a zero-or-one to zero-or-one relationship.
For example, let's say we have two tables Calls and Files. A call might have an attached file on it, and vice versa. ...
-1
votes
1
answer
45
views
Relationships in Prisma ORM
I'm trying to better understand relationships in Prisma ORM, from the docs:
model User {
id Int @id @default(autoincrement())
posts Post[]
profile Profile?
}
model Profile {
id Int @id @default(...
0
votes
1
answer
82
views
One to one relationship crashes when trying to intialize [duplicate]
@Model
class Habit: Identifiable {
@Attribute(.unique) var id: UUID = UUID()
@Relationship(deleteRule: .cascade) var completedDays: CompletedDays?
var name: String = ""
var ...
1
vote
1
answer
152
views
How to build a relationship in Laravel with an altered column value
this is my first question in StackOverflow. I am here because I am trying to build a particular relationship in Laravel. I would like to be able to make something like THIS
public function game()
{
...
-1
votes
1
answer
119
views
SSAS Tabular Model Date Relationship Does Not Work For Some tables in Power BI
I have created SSAS Tabular Model, in this model there is a date dimension table.
After connecting to the model in Power BI, I am facing a problem that the Date relationship is working for some tables,...
-1
votes
2
answers
66
views
how can i make many to many relationship between my two models successfully in my project in django?
After I made a project by Flask and SQLite, I want to make it by Django. I succeeded in adding foods to certain date.
And calculates the total calories but I fail to show the days with total calories ...
0
votes
1
answer
187
views
Laravel Filament 3.x | how dependent select can save data in pivot table?
i have created many to many relationship of tbl_products with tbl_sub_categories table using pivot table.
and sub_categories are depends on categories, it's fine i am able to get dependent data. but ...
0
votes
1
answer
176
views
Cascade Delete in SqlAlchemy One-to-Many relationship made without relationships()
In my FastAPI app, I use sqlalchemy. The main goal of the app is that each user is stored in a sqlalchemy table users and can create different contents (25+ different contents).
Each content has its ...
0
votes
1
answer
33
views
how to filtering on related tables in laravel
How do I query based on data in another table in a related query?
There are 2 "divided order" data, I want to filter them by id.
Thanks in advance for your help
my code;
$data = ...
1
vote
0
answers
77
views
Why is an implicitly set relationship property crashing when I'm trying to access it? [duplicate]
I'm using SwiftData with CloudKit and I have the following two classes:
@Model
class Category
{
@Relationship(deleteRule: .cascade, inverse: \Book.category) var books : [Book]?
var project: ...
0
votes
0
answers
32
views
Which side of a relationship can have entities that may not be associated with any entity on the other side: the "one" side or the "many" side?
Which side of relationship(In all possible mapping cardinality) can have entities that are not associated with any entity on the other side: the "one" side or the "many" side or &...
1
vote
1
answer
370
views
How to solve relationship issues with SwiftData / CloudKit?
I have the following model set up in my app which utilizes SwiftData and Cloudkit. A Project object has an array of Book objects. A Book object has an array of Reader objects. A Reader object has an ...
0
votes
1
answer
61
views
How can I fix a many to many relationship between two entities so that the third table is filled automatically in entity framework and web API (C#)
So I have a Customer entity and a Movie entity and I configured the many to many relationship correctly and EF created the third table CustomerMovie with two FK's being CustomerId and MovieId both ...