Questions tagged [cascade]

Cascade refers to a table-definition keyword in relational databases; it instructs the query engine to take a certain action (delete, update), when a primary key is modified, on tables linked by a foreign key.

Filter by
Sorted by
Tagged with
-2 votes
0 answers
9 views

I get a 'file not found' error when i try to create cascade dataset in Cascade-Train-GUI app [closed]

i want to create cascade dataset but i'm getting "file not found" error. this is my picture error enter image description here I don'tknow how can i‌‌‌ fix that. Please help me with this ...
moha sor's user avatar
0 votes
0 answers
25 views

With enableLazyInitialization = true, I am not able to save the Entity Object with CascadeType None

I am using hibernate.enhancer.enableLazyInitialization = true in my Spring boot application. hibernate version - 5.6.15 I have an entity Sample.java @Entity @Table(name = "sample") public ...
Sankeerthan Joshi's user avatar
0 votes
1 answer
51 views

Can't save Main Object with giving only ID of Nested Object - giving TransientObjectException Many to many relationship is used

Let me first introduce my whole problem, I have a UserEntity like this @Entity public class UserEntity extends IdDescriptionStateMetaEntity { //.. other members @ManyToMany @JoinTable( ...
hardkraja20's user avatar
0 votes
1 answer
19 views

How to implement Cascading in NHibernate using ClassMap (mapping by code)?

I am having some trouble with what seems to be a relatively simple cascading operation, but which I simply cannot get to work. I have four (simplified) classes: class Class { uint? ID; //IDs are ...
GalaxyGuy's user avatar
0 votes
0 answers
13 views

As a system architecture, should I encourage the team to use cascade characteristic of spring JPA?

I intend to forbid the cascades usage, we could do the cascade operation by additonal coding in the specific suituation if needed. Below are what I think about this: cascade query. In most cases, we ...
neo xu's user avatar
  • 11
1 vote
2 answers
164 views

deleteById() method not working with ManyToMany mapping: Spring Boot and JPA

I have a scenario in which I have a ManyToMany mapping between a Policy and a County entity tables. Here is the entity code- InsurancePolicy.java- @Entity @Table(name = "insurance_policy") ...
ayush's user avatar
  • 524
0 votes
3 answers
77 views

Cascade delete in Laravel [duplicate]

I have a example of cascade delete but it looks too big and complicated, is there a way to shorten this code? protected static function boot() { parent::boot(); static::...
tedecti's user avatar
0 votes
0 answers
43 views

PostgreSQL column "id" referenced in foreign key constraint does not exist SQL state: 42703

I have a table named 'country'. with an identity column called 'id' ALTER TABLE IF EXISTS public.country ADD COLUMN "id " integer NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 ...
Eleftherios Kaltsas's user avatar
0 votes
2 answers
33 views

MongoEngine - Adding reverse_delete_rule on ListField of ReferenceField Gives NotRegistered Error

I am using Flask + MongoEngine (0.22.1). I have 2 document types, where I don't have any circular dependency: from mongoengine import Document, StringField, UUIDField, ListField from ...
Melih's user avatar
  • 704
2 votes
1 answer
73 views

Need help to DELETE on cascade with sequelize and mySQL

I know the answer has already been posted several times but no ones has solve my problem. I just want to delete on cascade my comments when I delete a recipe Here the relation db.Recipe.hasMany(db....
user avatar
0 votes
1 answer
82 views

How to insert data in multiple tables in a single url through POST API springboot

I have a 2 entities UserDetails and Skills . Many users can have many skills and the user needs to enter the skill rating also. I have 3 tables skill,userdetails and skillratings. In skillratings ...
Amit Sha's user avatar
0 votes
1 answer
17 views

connect 3 tables with cascade SQL(phpmyadmin)

I have 3 tables, first table is "user" that contain all users. second table is "teacher" that contain just teachers, and the last table is "student" that contain just ...
Alex's user avatar
  • 13
0 votes
0 answers
35 views

Trigger multiple triggers at once

I am working on optimizing a delete query and I saw that when I delete multiple rows, the triggers run 1 per row. For example for 100 rows I get: Trigger for constraint other_table_1_fid_fkey: time=3....
yeger's user avatar
  • 351
0 votes
0 answers
110 views

SQLAlchemy and Alembic cascade delete

I'm using FastAPI with SQLAlchemy, Alembic, and SQLite3. Here are my simplified models class Parent(Base): __tablename__ = "parent" id = Column(Integer, primary_key=True, index=...
KurtosKalacs's user avatar
-1 votes
1 answer
16 views

Android: why Room removes parent if I remove only child?

I'm working with Room for an android application. @Entity(tableName = "author") data class AuthorEntity( @PrimaryKey @ColumnInfo(name = "authorId") val authorId: String, @...
Sbirulinu's user avatar
1 vote
1 answer
296 views

Debugging PostgreSQL triggers performance

I have a slow delete query. I used EXPLAIN ANALYZE to understand the bottleneck and I saw two triggers that are slow: Trigger for constraint other_table_1_fid_fkey: time=3.644 calls=1 Trigger for ...
yeger's user avatar
  • 351
0 votes
1 answer
33 views

How do i nudge an image up to show center of image in div?

To whom who can help, I used this answer here (Get div to shrink with image inside of it) originally to figure out the main issue, but now I want to be abke to nudge the image up to show the center of ...
DeBoer753's user avatar
0 votes
0 answers
28 views

ON DELETE CASCADE ENGINE=InnoDB not working from php pdo but works on mariadb [duplicate]

I want to delete a entry from table1 and delete also the matching entry from table2, link with table1 with foreign key and ON DELETE CASCADE. On Mariadb, the cascade works, entries form table1 and ...
MAX's user avatar
  • 1
5 votes
1 answer
99 views

Python Tkinter cascaded menu command not executing

I have a problem, which I am trying to solve, and have reproduced it with the code below. The issue that I have, is that I can get the specified command to work from a main menu item, but when the ...
Clive Bostock's user avatar
0 votes
0 answers
70 views

Foreign key on update cascade with condition (or where value = value)

I made a foreign key in a table(B) with a reference to another table(A) (I want to block a group of users at once, depending on their role instead of blocking them one by one) table(A) is for roles ...
Nader Hussein's user avatar
0 votes
1 answer
103 views

How to deal with Django Cascade deleted objects in django-simple-history?

I have a problem with django-simple-history when I use cascade deletion on objects. I have several tables in my database that inherit from other tables, so I’ve set the deletion to cascade. The ...
lewis32's user avatar
  • 35
0 votes
1 answer
76 views

How to dynamically create triggers INSTEAD OF DELETE where multiple foreign keys pointing to the same table in SQL Server?

I have following tables parent and child1. ParentID1 and ParentID2 in child1 table are pointing to ParentID in parent. Schema: -- Table creation logic --parent table CREATE TABLE [dbo].[Parent] ( ...
Anand Mohan Singh's user avatar
0 votes
2 answers
139 views

How to cascade on a column?

I have a table that links to another — called PageTopic and TopicPageRole respectively. The foreign key on PageTopic is: CONSTRAINT [FK_PageTopic_TopicPageRole] FOREIGN KEY ([PageRoleId]) REFERENCES [...
John Ohara's user avatar
  • 2,851
0 votes
1 answer
81 views

Is it possible to know which cascade has been selected?

Is it possible to know which cascade (cascadeid) has been selected in the following tkinter code? popup = Menu(root, tearoff=0) submenu = Menu(popup, tearoff=0) def com(cascadeid): pass # Doing ...
jpm's user avatar
  • 31
0 votes
1 answer
172 views

Hibernate: ManyToMany links are being deleted without CascadeType.REMOVE

I have such database tables: And these are the foreign key constraints: -- If current variable is being referenced by another variable, restrict deletion ALTER TABLE variable_variable ADD ...
Semyon Kirekov's user avatar
0 votes
0 answers
24 views

Power BI Cascade Chart changing format colors by Category

I have a datasets with Opportunities, which might be a Projection or Closed. The following data structure: I would like to have in a same graph the total "Annual Value" and the breakdown by ...
Ignacio's user avatar
  • 23
0 votes
3 answers
698 views

PostgreSQL: cascade delete on bidirectional references only for source column

I have tables variable and variable_variable. The last one holds 2 columns: variable_id_from variable_id_from Look at the schema below: If variable_variable has row with values {variable_id_from = ...
Semyon Kirekov's user avatar
0 votes
1 answer
807 views

Can't open .xml file in read mode Opencv

import cv2 data = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') returns: Can't open file: 'haarcascade_frontalface_default.xml' in read mode I'm new to all this and not quite sure ...
Joe Faulkner's user avatar
0 votes
0 answers
25 views

Accessing list on objects in Python object detection

I will edit this question so it is a bit more clear I am making my first attempts in Python and I made a simple code to detect faces and calculate the center of each rectangle using ...
Fernando's user avatar
0 votes
0 answers
128 views

due to foreign key relations, oracle locks a table which will not be affected by the delete statement (on delete set null / on delete cascade)

We observed that while issuing a delete statement, oracle is locking tables which are not impacted due to the specific delete statement. Consider 4 tables as below. create table TABLE_A (id number(14,...
GGC's user avatar
  • 1
0 votes
0 answers
39 views

Cascader component

import React from 'react'; import './index.css'; import { Cascader } from 'antd'; interface Option { value: string | number; label: string; children?: Option[]; } const options: Option[...
Malathi Shetty's user avatar
0 votes
0 answers
83 views

How to use optimistic lock version for cascade entity in micronaut

I already updated micronaut version to latest and micronaut-data is 3.9.1. I don't know whether it is a bug of micronaut-data. There is a version field for opt lock in entity1 and entity2: `data class ...
Hui Zhu's user avatar
0 votes
1 answer
85 views

Make an registry file which contains multiple cascade context (sub) menu

Up front, i am not a good programmer, just a novice / beginner: The following script has 2 levels of context menu (see screenshot) What i am trying to do is 1 level more from within (like in the ...
Jets's user avatar
  • 1
3 votes
1 answer
247 views

Performance of ON DELETE CASCADE in PostgresSQL

I have an issue related to performance of ON DELETE CASCADE. I'm trying to understand why it takes so long. For this topic purposes I simplified real case to schema presented below: CREATE TABLE IF ...
maly216's user avatar
  • 41
0 votes
0 answers
22 views

CascadeType for updating entity in relation @ManyToOne

I have two Entities in relation @ManyToOne: @Getter @Setter @NoArgsConstructor @AllArgsConstructor @Entity @Table(name = "TRIPS") public class Trip { @Id @GeneratedValue @NotNull ...
Kiemoon's user avatar
  • 57
3 votes
0 answers
282 views

How to insert related object only if not exists via SQLAlchemy ORM Relationship?

i'm a SQLAlchemy begginer ok? Consider a have a on-to-may relatioship like class Parent(Base): __tablename__ = "parent_table" id = Column(Integer, primary_key=True) children = ...
Jonathan Cardozo's user avatar
0 votes
1 answer
218 views

How to make function ondelete cascade in Laravel delete function

I want to delete this meeting room which the table reference to other table by foreign key. But when I deleted it shows an error : SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete ...
slvhxia's user avatar
  • 47
0 votes
1 answer
184 views

jinja2.exceptions.TemplateSyntaxError: expected token ',', got '{'

i got this error in my old code This the error when i run the code: i cant seem to understand what's the issue
Janmesh Boricha's user avatar
-5 votes
1 answer
54 views

Cascading in SQL

Is there any way to cascade non-key attributes(not a primary key nor a foreign key) with the help of SQL? Is this possible?
Prakhar Jain's user avatar
0 votes
2 answers
86 views

call "deleting" function with cascadeOnDelete()

I am developing an app in which you can create events and add posts to them. I have two Tables called events and posts. The events table has a preview_image column. The posts table has a picture ...
noah1400's user avatar
  • 1,452
0 votes
0 answers
45 views

Cascade delete in a one-to-one relationship in Access

New to Access so please excuse me for the basic question ... I have two tables in an Access database (Office 365 enterprise) for which I have setup a one to one relationship using the relationships ...
Andrew15's user avatar
0 votes
0 answers
79 views

Opencv_traincascade- is it not possible to train opcncv_traincascade with just 26 samples or less?

I am trying to run this code in terminal C:\Ankit\VirEnv\opencv\build\x64\vc15\bin\opencv_traincascade.exe -data cascade/ -vec C:\Ankit\VirEnv\pos3.vec -bg neg.txt -w 24 -h 24 -negPos 20 -numNeg 1000 -...
Ankit_Gunner's user avatar
0 votes
0 answers
283 views

OpenCV Createsamples - Error: Assertion failed ROI error

I am trying to run the following command in my VB Code terminal C:\Ankit\VirEnv\opencv\build\x64\vc14\bin\opencv_createsamples.exe -info C:\Ankit\VirEnv\pos.txt -w 20 -h 20 -num 1000 -vec pos.vec my ...
Ankit_Gunner's user avatar
0 votes
1 answer
27 views

How to set cascade deleting properly in Entity Framework 6 when I have two foreign keys?

I have below example and I need to have behaviour: when I delete RoundAssetT, I don't want to delete his assetOccurrences... I can't figure out how to set this relation in modelBuilder. public class ...
Mateusz Kaleta's user avatar
0 votes
1 answer
736 views

Delete records of table which has 2 foreign keys that reference to same table

I have 2 tables, first one is Compartment and second one is AboveCompartment. Please see the below. Above compartment has 2 columns which are foreign keys and reference to the Compartment table. When ...
nihasmata's user avatar
  • 652
0 votes
1 answer
673 views

How to update all foreign keys in a database

Is there a way to update one column and all foreign keys that refer to it in a database? I have a table with an id column that I would like to update with the following query: UPDATE Project SET id = ...
DeySeeMeRollin''s user avatar
0 votes
1 answer
152 views

ManyToMany how to remove child from parent list

How to remove object from list without removing that parent object in many to many relationship? I have ticketEntity with set of offenceEntity: public class TicketEntity { @Id private String ...
Lulex97's user avatar
  • 221
2 votes
1 answer
614 views

Gorm not updating array of child struct

I have the following structs type Parent struct { ID uuid `gorm:"type:uuid" example:"070942aa-604f-42d2-bc6f-7295eae1929d"` Name string Children []*Child `gorm:&...
Manuelarte's user avatar
  • 1,688
1 vote
0 answers
105 views

django-simple-history3.1.1 error when cascade deletion

For a Django project I work on, I use django-simple-history to get a history of each of my models. Everything works very well when I create, modify or delete an object, the library generates a <...
lewis32's user avatar
  • 35
0 votes
1 answer
95 views

Springboot JPA Hibernate CascadeType confusion

How to make a column cascade enable only for insertion not update and delete. Here are two class. There are @ManyToOne relationship between Qualification and Department. At the time of insertion I ...
Md-Mehedi's user avatar

1
2 3 4 5
28