5,650
questions
0
votes
1
answer
20
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
21
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
64
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
19
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
52
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
53
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 ...
0
votes
0
answers
26
views
SQLModel (SQLAlchemy and pydantic) Invalid Reference
Hi everyone Can someone help me, I tried to fix this error, looking in the web and with chatgpt but I can reach any solution.
I'm trying to modelate a database tables in sqlalchemy, using SQLModel but ...
0
votes
0
answers
23
views
Updating a Single Attribute in Ember-Data Model Also Resets Relationships
I'm working on an Ember.js application where I need to update a single attribute (views) on a book model using Ember Data. However, when I call save() on the model, the relationships of the book (like ...
-1
votes
1
answer
47
views
Django model's relationships and fetching (or excluding) related data from database [duplicate]
I'm having a hard time finding a decent explanation about this in django's official documentation, so I'll ask my question here.
in django 5.0 if two models have a relationship (let's call them Model1 ...
0
votes
0
answers
28
views
How to classify a structured data relationship when the comparators exhibit multiple relationships
I'm trying to pin down how to understand what defines whether two items in a relationship have a certain type of relationship.
For example, in the following table, Author CAN have a many-to-one ...
0
votes
0
answers
22
views
Establishing and manage relations within lifecycles and controllers in strapi js
I'm working on implementing a feature in Strapi where, upon creating a message, message statuses are automatically created for all users in the system. However, I'm facing difficulties establishing ...
1
vote
1
answer
51
views
Drawing Relationships In Entity Relationship Diagram
I used Azure to create a database. I used Azure Data Studio and https://github.com/R0tenur/visualization to create the following Entity Relationship Diagram / Relational Model (?). Are the ...
0
votes
1
answer
49
views
ERD for Learning Management System
I've attempted to create an ERD for my Learning Management System project. Here's a quick explanation, admin can manage both teacher and student, teacher can create many classes, students can access ...
0
votes
1
answer
42
views
Filter based on date between 2 dates
**Update 15/07/2024
I have now managed to resolve this issue with the following method;
InDateRange =
var _rangeStart=FIRSTDATE('Fiscal Year report'[Date])
var _rangeEnd=LASTDATE('Fiscal Year report'[...
0
votes
1
answer
17
views
Unable to understand why i get total count of wb_user id in all job code in power bi?
i have two table all freelancer profile and job profile joined with one to many relation common field are wb_user id
all freelancer wb_user id connected to multiple job profile wb_user id
i have ...
0
votes
1
answer
35
views
Entity Framework Core one-to-zero-or-one not binding included relations when querying
I have an Entity Framework Core code-first database with a one-to-one-or-zero relationship set up like this:
public class PrimaryRow
{
public int Id { get; set; }
public string Value { get; ...
0
votes
0
answers
67
views
Swiftdata crash when I try to delete some groups in the playlist
I guess something is wrong with my relations, I'm try to loop into the groups array and delete each one expecting that by cascade it delete also all the playlist items.
I structure my model as follow:
...
0
votes
1
answer
45
views
Seeding data when it has relationship
so i need to create foreach entity its own seed class.
the problem becomes when the is some hierarchy of entities, like one entity has a relation with another, second has relation with third and so on....
0
votes
0
answers
41
views
SwiftData One-To-Many Relation not Reflecting
I have two models in SwiftData Folders and Projects.
@Model
final class Project {
var projectTitle: String
var folder: Folder?
init(
projectTitle: String,
folder: Folder,
...
0
votes
0
answers
115
views
Issues Importing Excel Data with BelongsTo Relationship in Filament
I am trying to import data from an Excel file into my laravel Filament (V3) application , but I'm having trouble with importing relationships. Specifically, I have a Stock model that has a belongsTo ...
0
votes
1
answer
68
views
Get one to many relationship in the pivot table of another many to many relationship in Laravel 11
I have a Place, User models with a many to many relationship as the pivot table / model named Reservation, I needed to make a new relationship between the pivot table and another table called ...
0
votes
0
answers
30
views
SQLAlchemy ORM Join on Sub-object Value
I have four classes, Category, Product, Attribute, and AttributeValue such that
class Category(Base):
...
id: int
class Product(Base):
...
id: int
categoryId: int # Foreign key on ...
2
votes
3
answers
126
views
On which side shall I put the diamond sign in an UML diagram
I am trying to figure out where should the diamond be placed in this example, I understand its a has-a relationship and diamond should be placed to indicate the whole and part relationship.
I have ...
0
votes
0
answers
36
views
Relationship problem with SQLAlchemy and SQLite in Python
I created a db in SQLite and added tables with SQLAlchemy.
DB_URL = "sqlite:///wimp.sqlite3"
engine = create_engine(DB_URL, echo=True)
Session = sessionmaker(autocommit=False, autoflush=...
-1
votes
1
answer
117
views
Violating the Single Responsibility Principle? [closed]
We are creating a one-to-many relationship in a class, for example, a student can have many books.
In this class, are we not breaking the Single Responsibility Principle?
Because Student class has its ...
0
votes
1
answer
28
views
Connection between table seo_url and table product_category in Shopware6
is it possible, connecting table seo_url with table product_category by Query? If yes, which tables have to be joined?
0
votes
0
answers
43
views
gorm define a valid foreign key for relations
I have following tables in postgresql:
CREATE TABLE IF NOT EXISTS "offices" (
"id" uuid NOT NULL DEFAULT uuid_generate_v4(),
"full_name" ...
0
votes
0
answers
27
views
How to solve sqlalchemy Invalid-Request-Error?
I want to create a relationship between Users and Habits, but I have a problem:
in get_property
raise sa_exc.InvalidRequestError(
sqlalchemy.exc.InvalidRequestError: Mapper 'Mapper[Users(users)]' ...
0
votes
2
answers
69
views
Entity has relationship with a second entity and with bridge entity between both entities
I am pretty new to Database design and I wish to know if the following design is accepted.
As you can see in my ER Diagram, the Museum entity has a relationship of one-to-many with the Guard, as many ...
0
votes
0
answers
28
views
Why use useTransaction in preload but not in andWhereHas in AdonisJS(lucid orm)?
Can someone explain why useTransaction is necessary in the preload method but not in the andWhereHas method in AdonisJS?
I'm using AdonisJS 5.3 and couldn't find any documentation about this.
const ...
0
votes
1
answer
44
views
flask sqlalchemy relationship error with abstract class
I have a set of classes that are related to each other
Subject one-to-many with Recruitment
Recruitment one-to-many with RecruitTable which is an abstract super class of several other classes
This is ...
0
votes
0
answers
37
views
Power BI REST API - how to define cardinality for push datasets
I am creating push datasets programmatically and binding them to some standard Power BI report templates. The creation of the datasets is being done using the Power BI REST API.
My templates require ...
1
vote
0
answers
54
views
Include related tags when filtering by a specific tag
I have a Power BI report where I'm using a table named Words that contains two columns, index-id (numeric) and tag (text). Some tags are related to others, such as "Channel" and "...
-1
votes
1
answer
55
views
Symfony 5+ Timestamp a ManyToMany relationship
I have a relationship between two entities:
FosterFamily
Animal
On Animal entity I have a field called "FosterFamiliesHistory" which is a ManyToMany relationship to FosterFamily entity ...
0
votes
0
answers
30
views
SQLAlchemy table with every row pointing to a single CSV file (postgres)
Basically I am trying to create a database where it stores the WeatherData for a year for a specific location, and so the first table would be 3 columns : Country, State, City all primary keys and ...
-1
votes
2
answers
57
views
Laravel Basic BelongsToMany [closed]
I have ProductCollection Model and AttributeValue Model which have a common table product_collection_attributes that has 2 columns: product_collection_id and attribute_value_id that are a foreign key ...
0
votes
0
answers
19
views
Form array in Angular and ASP.NET
Could someone put me out of my misery? I am desperately trying to understand how a form array of data is sent to an ASP.NET API and ultimately stored in SQL Server.
I can create the Angular form which ...
1
vote
2
answers
89
views
Cardinalities for ternary relations in ERD diagram
Re that ERD:
I can represent a many-to-many relationship with m to m.
What is m to n in the ternary relationship?
Can I use it in a binary or unary relationship?
What does it mean?
What is m to k?
Can ...
0
votes
1
answer
20
views
how to delete all eloquent child one by one. its hierarchy like category => course => chapter => exams
I have one issue when i delete parent i want to delete all child of from different modal.i want when i delete category delete all course of category and delete all chapter of course and delete all ...
0
votes
0
answers
46
views
Prisma ORM: Many to many on the same model, multi directional, inferring parent model?
I have a simple concept I'm struggling to understand regarding many-to-many relationships in Prisma. I have a model, an "Artist" and I want to have a relatedArtists array to show similar ...
0
votes
0
answers
47
views
Laravel query relationship with different connection not working
I'm using Laravel 11, Oracle Database for my project. I have some models:
class Order extends Eloquent
{
use HasFactory;
protected $connection = 'db_order';
protected $table = 'orders';
...
0
votes
0
answers
41
views
Spring Boot Neo4j, How can i create a relationship with parametrized name?
i'm using Java Spring boot with a Neo4j server. My idea is to create a relation with the label given as a parameter.
I tried to use the $ like for a normal attribute:
@Query("MATCH (d:Device), (t:...
0
votes
1
answer
33
views
How to access drop-down relationships in Laravel
Models :
USER
boards() : HasMany
BOARD
lists() : HasMany
LIST
tasks() : HasMany
TASK
Tables :
Board :
id
user_id
List :
id
board_id
Task :
id
list_id
How do I want to search for a task ...
0
votes
1
answer
76
views
Custom Cardinalities in Microsoft Access
I am designing a Basketball Season Statistics database as my final project for my Database Management class, and I am running into trouble with creating custom relationships. More specifically, I ...
1
vote
0
answers
31
views
Cross filter through slicer
I want a slicer in my Power BI dashboard to filter a table visual. But this slicer is about a table ("StructuresInMarket") which is not in a direct "1 to many" relationship with ...
0
votes
1
answer
38
views
SQLAlchemy error creating relationship between tables
I'm trying to make a simple database using SQLAlchemy from two tables: Users and Couple.
The Couple table must contain a "couple" of users from the Users table.
For example:
Users:
id
...
0
votes
0
answers
102
views
SQLAlchemy relationship warning
I've book, author and section model with relationship and I'm getting a warning:
SAWarning: relationship 'Section.books' will copy column section.id to column book_section.section_id, which conflicts ...
0
votes
0
answers
19
views
Power BI compare attainment of students with historic norms
I have a table 'Attainment' that contains the following:
Adno = a unique identifier for a student (it's their admission number)
Subj = the code for the subjects being studied (eg Ma for Maths, en for ...
2
votes
1
answer
44
views
Assistance to fix query to identify recursive relationships in data in SQL DW
I have a table which has hierarchical relationships.
My input data is
product_identifier parent_product_identifier Zone
------------------ ------------------------- ----
1 5 ...
3
votes
1
answer
168
views
Which one is invalid relationship from the uml diagram shown below?
According to me correct choice is A because aggregation and composition relations can't coexist within the same class.
However, option C also seems plausible, creating some confusion for me.
Option b ...