Donnerstag, 18. Oktober 2018

Sql fremdschlüssel

Hello, Rewriting my mail-hub I fell into the following . Other choices include Set Null , which, if the delete or update will result in a referential integrity violation, the database will put Null into the . CONSTRAINT `joke_ibfk_1` FOREIGN KEY (`author_id`) REFERENCES `author` (`id`) ON DELETE SET NULL ON UPDATE CASCADE ) . All associations use CASCADE on update and SET NULL on delete , except for n: m, which also uses CASCADE on delete. When creating associations, you can . When we write Update and Delete queries on parent tables, we need…. No Action; Cascade; SET NULL ; SET Default.


I have entities, A and B. A contains a foreignKey to B. B, i want to set to NULL the foreignKey into A. How i can configure this in annotation ? I can also set a property to be required with data annotations. Null Number Numeric String Time Timestamp Timestamp with time zone. A whitespace is required before the first set of dollar signs. You might consider using ON DELETE SET NULL , so that customer records that were in the state that was deleted are retaine with their state code set to null .

Keine Kommentare:

Kommentar veröffentlichen

Hinweis: Nur ein Mitglied dieses Blogs kann Kommentare posten.

Beliebte Posts