Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 09459200C4B for ; Mon, 20 Mar 2017 07:43:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 07CAD160B81; Mon, 20 Mar 2017 06:43:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 29494160B76 for ; Mon, 20 Mar 2017 07:42:59 +0100 (CET) Received: (qmail 52369 invoked by uid 500); 20 Mar 2017 06:42:58 -0000 Mailing-List: contact users-help@isis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@isis.apache.org Delivered-To: mailing list users@isis.apache.org Received: (qmail 52308 invoked by uid 99); 20 Mar 2017 06:42:52 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Mar 2017 06:42:52 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 41E5D1A7A75 for ; Mon, 20 Mar 2017 06:42:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.16 X-Spam-Level: X-Spam-Status: No, score=0.16 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, KAM_INFOUSMEBIZ=0.75, RCVD_IN_DNSWL_LOW=-0.7, T_DKIM_INVALID=0.01] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=neutral reason="invalid (public key: not available)" header.d=kmz.co.za Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id w1g8mHGkix6d for ; Mon, 20 Mar 2017 06:42:48 +0000 (UTC) Received: from spam1.thewebhostserver.com (spam1.thewebhostserver.com [213.5.180.33]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 2A0025F283 for ; Mon, 20 Mar 2017 06:42:48 +0000 (UTC) Received: from [88.202.227.70] (helo=neptune.thewebhostserver.com) by spam1.thewebhostserver.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86) (envelope-from ) id 1cpr1b-0002pM-JZ; Mon, 20 Mar 2017 06:42:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kmz.co.za; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:To:From: Subject:Date:References:In-Reply-To:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=XjZpTtjo8tG1CpUsqlkCcRq5tVSRcuLAM0uWNMAET/E=; b=J8ieJYvwF5J1svn+eWNDbXdVG5 1CLTpBX8Vx7ZfoGuND0fNNEj+3CGQeUWwlFtnAqkOoK3K5KVyH7jCHmz0efr8IP4pHbtzze13Us4T nPJzPsd8KzKORwCpAMLOL1OJ2ig2RNai3YUSDKTI2UrLQkdCoD0rHwb2KmKyfv5AbSTqwhIKaOeYy 0mB9osYLU1YP5LS+6jwIxwK5L0rzQmPYpQYicrIrRbDf4CojAOOOJDobDt/OCwfMQhIepDp3O6vmG mYjkbkKx5rSv55kCDZGRJGqEQIJn4xMv/itSSBpLbw/u55fzNdULLDiA3ZX9gVJsVfiVZFuKSSvQ/ +dTdiCDw==; Received: from [::1] (port=44786 helo=www.kmz.co.za) by neptune.thewebhostserver.com with esmtpa (Exim 4.88) (envelope-from ) id 1cpfhx-002anQ-SG; Sun, 19 Mar 2017 18:37:37 +0000 Received: from 31.15.207.171 ([31.15.207.171]) (SquirrelMail authenticated user kevin@kmz.co.za) by www.kmz.co.za with HTTP; Sun, 19 Mar 2017 19:37:37 +0100 Message-ID: In-Reply-To: <466364306.4915535.1489465876582@mail.yahoo.com> References: <2077943161.988524.1488953103156.ref@mail.yahoo.com> <2077943161.988524.1488953103156@mail.yahoo.com> <5994fa68fd44bdee9e68f223afa7320a@kmz.co.za> <466364306.4915535.1489465876582@mail.yahoo.com> Date: Sun, 19 Mar 2017 19:37:37 +0100 Subject: Re: Deep copy object graph From: "Kevin Meyer" To: "David Tildesley" Cc: "users@isis.apache.org" User-Agent: SquirrelMail/1.5.2 [SVN] MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-AuthUser: kevin@kmz.co.za X-Originating-IP: 88.202.227.70 X-SpamExperts-Domain: thewebhostserver.com X-SpamExperts-Username: neptune Authentication-Results: thewebhostserver.com; auth=pass (login) smtp.auth=neptune@thewebhostserver.com X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.06) X-Recommended-Action: accept X-Filter-ID: s0sct1PQhAABKnZB5plbIcHx4Yjy+JJHcTtFXbuM0pi+wymV5Vy5E8fEQzn6i19Mnoqm8hwDKeix eZG/r4xVUMHWLskgtrPPiNoy7paCXPqBwvwpmF4FzV7I96G4QFLYD9jUwze01aovvuFqWZ9Jjsj2 PjI4jMPekIOhXV4xeigyEW+uL76U88QaOmkJuQFBIbtf63VNbf0lrvssY+k7AJQLXg+z9YCMuCNN VLPgBze4jaFIxYpIDwfyK8jjJiYNV2BxoocY16B58Pm7ryDC2csl0iuhdNkQJk9yFPZu1hX+mOik teqya2NNpMb9X8NGbaU1QnAIqZnT0CaafEGhJY0+3nwsrOpLmx54XRfNAEstS9mIAfx/A3ipd7OT DyOAzBA/eAJEMxG7im+WYkrvYvHIViODDarCZvI/V5qDm2hNfSYs694iF6bD9GEDtM0YCE0MXwgU +4XhWA7pRQlcKMsl0iuhdNkQJk9yFPZu1hUw7+KMtoemwN8keIAcPKMB4oss4NBSZ75SN3aG+rXt 53t6d9p2osX4N+U7IVtyGAmlHus1TmSsmP1nqKnuFbZLzJtheudxN7sBoqT6pKLd7ct3Pdm5e4q8 Gz+U3brdjibdD4pvyf8rZLP+ovPfbSieFFmiQz2L16h2RLHr+5w6TO6AXiDpBqooJcfInRprSI/7 WDrWHdCmGVs7NfYFlRLSDaXql+zVuXINqF2nIzC8FnJbG8HNFW3DW5/maZBZH7XrHU1SZgVOHaI1 90Ll88pyE3oYvqf0DmW23/z5XWZ61Jujof4Hg/8O8gUfuoqJPGcmlMyiWbptNFZLZjSemNgiLP+g 5i5wtFm/99I1Qd8/+FKzyYqovbw8flAMuBHJmrRsq2TEl0DDMwAmg3nrj5yK X-Report-Abuse-To: spam@spam1.thewebhostserver.com archived-at: Mon, 20 Mar 2017 06:43:00 -0000 This got caught in my spam folder... I fully understand your desire for deep clone in the persistence layer - laziness is a respectable reason! Let us know if you find something that works for you, please. Cheers, Kevin On Tue, March 14, 2017 05:31, David Tildesley wrote: > Thanks Kevin, > I guess I was looking for something like deep clone using serialization > rather than detach-clone-persist and so on through the object graph. > Being lazy ;) > Regards,David. > > > On Tuesday, 14 March 2017 4:07 PM, "kevin@kmz.co.za" > wrote: > > > > Hi David, > > > Did you find a solution? > > > Just a question: Why would you not use a standard service action to > create the copy? Is there any reason why you want Datanucleus to do it? > > Personally, I would try and use a service that creates a copy of the > current records and updates the public reference instance to always point > to the latest (perhaps use a Proxy, for example - and another > administrative view that displays the full set of changes over time). > > Cheers, > Kevin > > > > On 2017-03-08 06:05, David Tildesley wrote: > >> Hi, >> I have a need to keep public records and to be able to edit objects >> and put them through a publishing lifecycle whilst public can view the >> current record without seeing the changes. Temporal object pattern [1] >> seems like the simplest pattern. Then it comes down to how hard or easy >> it is to simply  copy a components entire object graph to make a new >> version (don't really care about the duplication of data that hasn't >> change from version to version). Datanucleus has some support for coping >> an object graph from one repository to another - I assume you can copy >> to the same repository to achieve what I want to do. Krypo [2] seems like >> it is being used by Datanucleus. Anyways - how to do this with ISIS? Any >> suggestions appreciated. Some context: >> A Building (component)  has a current FireSafetyCertification >> (component) and is published as a public record and these records are >> kept for 10 years. A change to a record that is viewable by the public is >> regarded as a new public record. Overtime (slowly) these >> FireSafetyCertificates may expire/withdrawn/change in detail. But when >> they are published they constitute a public record. Building has names, >> addresses, images, parts, construction details, etc. whilst >> FireSafetyCertification has documents, exemption notices, expiry dates >> etc.  Using the Temporal Object pattern, a Building object has 1..* >> BuildingVersion and all of the Building's detail hangs off >> BuildingVersion.  >> Any other suggestions instead of Temporal Object pattern also >> appreciated. >> >> [1] https://martinfowler.com/eaaDev/TemporalObject.html  >> [2] http://camposha.info/source/java-kryo/ >> Thanks! >> David. >> > > > -- Kevin Meyer Ljubljana, Slovenia