8,787 questions
0
votes
1
answer
57
views
Query builder Relation ManyToMany without the association entity
The context is a Symfony 6 project wired with Doctrine 3. I have a ManyToMany relation between Projet and Employe, and in the list page of the projects i want to display only the projects for whom the ...
0
votes
0
answers
60
views
Many To Many Product and Categories
so i have a many to many relationship data about categories and product
here the table
-- public.product definition
-- Drop table
-- DROP TABLE public.product;
CREATE TABLE public.product (
id ...
0
votes
1
answer
70
views
Update many-to-many table with composite primary key in Oracle
I have 2 tables and a many-to-many relationship between them. For this many-to-many relationship to work, I created a new table. This many-to-many table has only the ids of the other 2 tables: ...
-1
votes
1
answer
48
views
Java Spring Boot Many-To-Many Data Retreival
Given a 'many-to-many' relationship between Event and Users, I'm having trouble retrieving attendees' details when I retrieve an event by its id.
Output: Event(id=1, attendees=[])
Classes are as ...
0
votes
3
answers
58
views
Check for a specific relation in Laravel Many-To.Many relationship
I have an application with a User model and a Group model as well as a Many-To-Many relationship defined between both models.
I now would like to check if a user is member of a specific group.
I know ...
1
vote
0
answers
250
views
How do you generate Gorm tables with relations?
I'm trying to achieve this
Add functional tests to my Go project
The tests should bring up an actual MySQL database (by connecting to a docker container already up and running from the docker ...
0
votes
1
answer
51
views
Hibernate @ManyToMany Mapping Issue: Unknown Column in Join Table On Clause (hibernate ignoring @JoinTable and @JoinColumn annotations)
I'm encountering an issue with a @ManyToMany mapping in my Spring Boot application using Hibernate. The problem arises when Hibernate tries to execute a query involving the join table for a Set<...
0
votes
1
answer
44
views
Is it a one-to-many or many-to-many relationship?
I was wondering whether the following would be either one-to-many or many-to-many relationship
The Users and Services tables are defined as follows:
USERS SERVICES
+---+------------+...
1
vote
1
answer
29
views
models.ManyToManyField Necessity
I can't understand, what benefits we get when adding models.ManyToManyField if using intermediary model? Is it necessary?
I want to use base (not custom) user model in my project. Should I redefine ...
1
vote
0
answers
222
views
How make Laravel Sushi Models Many to Many Relationships
:D
I can't make a Many to Many Relationships between
two Laravel Sushi Models.
For example, I have two sushi models: Product and Category. I want to make a many-to-many relationship between them.
...
0
votes
1
answer
43
views
Node.JS Typescript TypeORM ManyToMany `save` overrides previous relation instead of adding a new one
I have the following typescript TypeORM model:
@Entity()
export class Student extends EntityBase {
@Column({ length: 256 })
public firstName: string
@Column({ length: 256 })
public ...
0
votes
1
answer
51
views
Node.JS Typescript TypeORM ManyToMany relations with empty result set
I have the following typescript TypeORM model:
@Entity()
export class Teacher extends EntityBase {
@Column({ length: 256 })
public firstName: string
@Column({ length: 256 })
public ...
-1
votes
1
answer
176
views
Get entity with Many-To-Many Relation with API Platform
I have an entity Professionnal with Jobs in API Plateform project 3.2.
When I call host/api/professionnals I got a result like this :
{
"data": [
{
"id": &...
1
vote
1
answer
77
views
How to insert many rows of tags based on input array?
I have a table of posts, a table of hashtags, and a table linking posts to hashtags, like so:
CREATE TABLE posts(
id SERIAL PRIMARY KEY,
post_data VARCHAR(128) NOT NULL
);
CREATE TABLE hashtags (
id ...
1
vote
2
answers
44
views
How to access specific intermediate table in case of multiple ManyToMany relationships in Laravel Eloquent relationship
I have a model Product, and the same product can be sold by multiple supermarkets and outlets, so I define two BelongsToMany relationships for them:
class Product extends Model
{
public function ...
0
votes
1
answer
151
views
Realm Swift many-to-many linking objects not persisting when I restart app
I have an app that retrieves iOS contacts from the UI and then creates "ProductionContact" objects from them. My goal is to assign these contacts to numerous existing shoots and productions. ...
0
votes
0
answers
32
views
Laravel true polymorphic "many-to-many" relation
Laravel doc provides polymorphic "many-to-many" sample (pivot table taggables) with the following structure:
taggables
tag_id - integer
taggable_id - integer
taggable_type - ...
0
votes
2
answers
218
views
ef core: unidirectional many-to-many relationships
EF Core beginner here, so please be patient. We're trying to migrate an existing app from NHibernate to EF Core and we're facing several interesting issues. One of them is related with unidirectional ...
-1
votes
1
answer
43
views
M:M relationship results in empty set when fetching either object
I have a many-to-many relationship between a Category and an Attribute object since every category can have many attributes.
This is my Category object:
@Data
@Entity
@Table(name = "categories&...
1
vote
0
answers
58
views
I get many-to-many error from the promql dividing a vector with the same vector
I just started to study promql and playing with it.
And studying two vector operators, I tried to the promql below expecting to get 1 for all samples.
Query
(sum by (__name__) ({__name__=~"count_....
1
vote
0
answers
59
views
Hibernate @ManyToOne case insensitive
We have two Oracle tables like this:
TABLE_1
-------
CODE_TABLE_1 | LIBEL_TABLE_1
-----------------------------
code_table_1.1| libel_table_1.1
code_table_1.2| libel_table_1.2
code_table_1.3| ...
1
vote
0
answers
760
views
How to Structure a Many-to-Many Relationship in Drizzle ORM to Receive Related Records as an Array?
Question:
I'm using Drizzle ORM version 0.30.10, and I'm working with a many-to-many relationship in my database schema. Currently, I receive the related records as objects, but I want to receive them ...
0
votes
2
answers
48
views
PHP Laravel Eloquent ORM. How to test table relantionship (belongsToMany)
I'm currently building an API assigned for an ecommerce project using Laravel framework. While getting help to build data migrations and Models, I got confused on how the product_categories, the ...
1
vote
1
answer
57
views
Optimizing query to filter many-to-many relationship on row-count
My model:
class RecipeTag(models.Model):
tag = models.CharField(max_length=300, blank=True, null=True, default=None, db_index=True)
recipes = models.ManyToManyField(Recipe, blank=True)
...
1
vote
0
answers
54
views
Many To Many Relationship - coding conflicts
public class Invoice {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Long id;
// Some fields ...
@ToString.Exclude
...