6,470 questions
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
0
answers
46
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
330
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 $...
1
vote
1
answer
33
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'...
0
votes
0
answers
95
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 ...
0
votes
0
answers
41
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....
0
votes
1
answer
39
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
0
answers
34
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
...
1
vote
0
answers
54
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
41
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
votes
1
answer
64
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
0
answers
26
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
43
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
2
answers
202
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(): ...
0
votes
0
answers
36
views
Create relationships between entities (park, caretaker, maintenanceLog, court, equipment) for my project?
My project brief :
To run Racketminster, the town has several lush parks which contain dedicated courts for racket sports. To ensure that
they are always kept in pristine condition, the town parks are ...
0
votes
1
answer
89
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
33
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
0
answers
56
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
0
answers
39
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 ...
3
votes
2
answers
143
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. ...
0
votes
1
answer
81
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
votes
1
answer
114
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,...
0
votes
1
answer
186
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
27
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 = ...
0
votes
0
answers
28
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 &...