[ 
https://issues.apache.org/jira/browse/OFBIZ-1313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12533574
 ] 

Jonathon Wong commented on OFBIZ-1313:
--------------------------------------

Oh, I see. I didn't realize a primary key field cannot be null. Anyway, nulling 
visitId could create duplicate keys.

Perhaps dump affected TrackingCodeVisit records to an entity like 
ArchivedTrackingCodeVisit that doesn't have visitId tied to a foreign key 
constraint?

Or, how about changing the primary key of TrackingCodeVisit such that some date 
field is used in place of visitId?

> Remove some Visit-related foreign keys
> --------------------------------------
>
>                 Key: OFBIZ-1313
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1313
>             Project: OFBiz
>          Issue Type: Improvement
>            Reporter: Si Chen
>            Assignee: Si Chen
>            Priority: Minor
>
> I would recommend that we remove the foreign keys to the Visit entity, so old 
> Visit records can be safely deleted without affecting data in 
> TrackingCodeVisit, which might be useful for statistical and reporting 
> purposes.  It should not affect the core entities.  The visits would only no 
> longer be available after some time has passed.
> If no one has any objections I'll take care of this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to