[ 
https://issues.apache.org/jira/browse/HIVE-23836?focusedWorklogId=459298&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-459298
 ]

ASF GitHub Bot logged work on HIVE-23836:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/Jul/20 13:53
            Start Date: 15/Jul/20 13:53
    Worklog Time Spent: 10m 
      Work Description: belugabehr commented on pull request #1239:
URL: https://github.com/apache/hive/pull/1239#issuecomment-658781200


   @ashutoshc You were correct about marking the association for deletion.  I'm 
not sure if this is already the default value, but better safe than sorry.  
Could use a review. Thanks :)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 459298)
    Time Spent: 20m  (was: 10m)

> Make "cols" dependent so that it cascade deletes
> ------------------------------------------------
>
>                 Key: HIVE-23836
>                 URL: https://issues.apache.org/jira/browse/HIVE-23836
>             Project: Hive
>          Issue Type: Bug
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> {quote}
> If you want the deletion of a persistent object to cause the deletion of 
> related objects then you need to mark the related fields in the mapping to be 
> "dependent".
> {quote}
> http://www.datanucleus.org/products/accessplatform/jdo/persistence.html#dependent_fields
> http://www.datanucleus.org/products/datanucleus/jdo/persistence.html#_deleting_an_object
> The database won't do it:
> {code:sql|title=Derby Schema}
> ALTER TABLE "APP"."COLUMNS_V2" ADD CONSTRAINT "COLUMNS_V2_FK1" FOREIGN KEY 
> ("CD_ID") REFERENCES "APP"."CDS" ("CD_ID") ON DELETE NO ACTION ON UPDATE NO 
> ACTION;
> {code}
> https://github.com/apache/hive/blob/65cf6957cf9432277a096f91b40985237274579f/standalone-metastore/metastore-server/src/main/sql/derby/hive-schema-4.0.0.derby.sql#L452



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to