![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
| Nabil Sayegh wrote: Hi all, I have a db structure with a VIEW that I need to reference (ON DELETE CASCADE). I know that it is not possible to have references on a VIEW, but maybe someone has some TRIGGERs at hand that do this job. [...] Last i heard VIEWs aren't yet updateable, but there are plans to make them so sometimes in the future? |
#3
| |||
| |||
|
|
Well, you don't need to reference the VIEW (doesn't make sense anyway) but your OBJEKT table. |
|
Further the Referencing should start from your OBJEKT table, so you could cascade through all tables without any problem. -- -- This is the virtual product table -- CREATE VIEW product AS SELECT * FROM objekt JOIN price USING (id_objekt) LEFT OUTER JOIN expire USING (id_objekt) WHERE expire IS NULL OR expire > now(); |
#4
| |||
| |||
|
|
Last i heard VIEWs aren't yet updateable, but there are plans to make them so sometimes in the future? |
![]() |
| Thread Tools | |
| Display Modes | |
| |