﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>CapableObjects Forums / ECO / General discussions  / Deleting versioned class / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>CapableObjects Forums</description><link>http://www.capableobjects.com/apps/InstantForum414/</link><webMaster>forums@capableobjects.com</webMaster><lastBuildDate>Wed, 08 Feb 2012 22:28:32 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Deleting versioned class</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5168-4-1.aspx</link><description>I have identified the problem that causes this. It was a case of code tidying that went wrong. There was a property that kept track of the relevant timestamp that used to be backed by an explicit field. The property was now backed by a compiler generated field, but the original field was still left in the code and was set by some code (instead of setting the property with the compilergenerated field). &lt;br&gt;&lt;br&gt;The fix for this will be checked into the ECO 5 branch today and should be in a build on http://dl.capableobjects.com/dailybuilds/ later tonight.&lt;br&gt;&lt;br&gt;/Jonas</description><pubDate>Tue, 25 May 2010 11:39:56 GMT</pubDate><dc:creator>Jonas Hogstrom</dc:creator></item><item><title>RE: Deleting versioned class</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5168-4-1.aspx</link><description>Hi,&lt;br&gt;&lt;br&gt;Edit:&lt;br&gt;updated to Eco6, still have the same error.....&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Johannes</description><pubDate>Tue, 18 May 2010 20:56:59 GMT</pubDate><dc:creator>Johannes Klos</dc:creator></item><item><title>RE: Deleting versioned class</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5168-4-1.aspx</link><description>Hi,&lt;br&gt;&lt;br&gt;I haven't tried Eco6, since I do not have a licence for it. I will download the test version and see what it is doing.&lt;br&gt;&lt;br&gt;Johannes</description><pubDate>Tue, 18 May 2010 20:35:00 GMT</pubDate><dc:creator>Johannes Klos</dc:creator></item><item><title>RE: Deleting versioned class</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5168-4-1.aspx</link><description>I took your project from mantis, and added Product, set some values on the amounts, saved, restarted server and client... &lt;/P&gt;&lt;P&gt;It all seems to churn along ok... I cannot repeat this (using current build eco6 )</description><pubDate>Tue, 18 May 2010 20:11:55 GMT</pubDate><dc:creator>HansKarlsen</dc:creator></item><item><title>RE: Deleting versioned class</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5168-4-1.aspx</link><description>Hi Peter,&lt;br&gt;&lt;br&gt;in order to figure out wether the persistance server is the cause i created a Eco project without a persistance server, so i have the sql connection stuff in the mein program. It still does NOT work. So it is not the persistance server...&lt;br&gt;&lt;br&gt;Bye,&lt;br&gt;Johannes</description><pubDate>Sun, 16 May 2010 15:22:34 GMT</pubDate><dc:creator>Johannes Klos</dc:creator></item><item><title>RE: Deleting versioned class</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5168-4-1.aspx</link><description>Reported to mantis: #905&lt;br&gt;&lt;br&gt;And I will go on to figure out where the problem is coming from...</description><pubDate>Sun, 16 May 2010 14:33:41 GMT</pubDate><dc:creator>Johannes Klos</dc:creator></item><item><title>RE: Deleting versioned class</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5168-4-1.aspx</link><description>Hi Johannes,&lt;/P&gt;&lt;P&gt;I've tried to create a application from scratch like you did with the same functionality:&lt;/P&gt;&lt;P&gt;* WinForms application with persistence server&lt;BR&gt;* One class with versioning&lt;BR&gt;* WinForms only has Eco debugger on it where I was able to add and delete versioned objects.&lt;/P&gt;&lt;P&gt;The result was: The application that was automatically created from the Eco project template did NOT work with versioning. I've tried with Eco version 5.0.0.4754. Something has to be missing in the template for versioning.</description><pubDate>Sat, 15 May 2010 01:17:03 GMT</pubDate><dc:creator>Peter Buchmann</dc:creator></item><item><title>RE: Deleting versioned class</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5168-4-1.aspx</link><description>Hi Johannes,&lt;P&gt;sorry that I didn't answer earlier. &lt;/P&gt;&lt;P&gt;I think I know what your problem is but still don't know how to solve it as we are still in ECO3 and don't work with a persistence server.&lt;/P&gt;&lt;P&gt;You persistence server doesn't know something about your EcoPackage. Just try to rename a table in your model (change attribute tablename in model). Your Ecospace knows the correct table name, your persistence server doesn't. So the additional infos in the ecopkg file are not known to the server an so it thinks that the table item is not versioned (as this info is also contained in the file). &lt;/P&gt;&lt;P&gt;I still don't know how to tell this Info to the server. Maybe someone else does.</description><pubDate>Thu, 13 May 2010 13:30:39 GMT</pubDate><dc:creator>Peter Buchmann</dc:creator></item><item><title>RE: Deleting versioned class</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5168-4-1.aspx</link><description>Hi Peter,&lt;br&gt;&lt;br&gt;did you find any error/problem in here?&lt;br&gt;&lt;br&gt;thanks,&lt;br&gt;Johannes</description><pubDate>Thu, 06 May 2010 22:03:30 GMT</pubDate><dc:creator>Johannes Klos</dc:creator></item><item><title>RE: Deleting versioned class</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5168-4-1.aspx</link><description>Hi Peter,&lt;br&gt;&lt;br&gt;I have created a small project which shows two errors (Assertion error, different thread and the deleting objects problem) It is attached to the thread here. In here I have an Order...Item association (1..n) and I cannot delete items. After restarting the app they appear again. I think the TIMESTAMPSTOP values are all set correctly (from MAXINT to the corresponding TIMESTAMPSTART-value in the items table). The SQL which is created for Items.Allinstances (would correspond to Rezeptur.allinstances) looks the following:&lt;br&gt;[code]SELECT ECOModelRoot_A.ECO_ID, ECOModelRoot_A.ECO_TYPE FROM ECOModelRoot ECOModelRoot_A INNER JOIN Item Item_A ON ECOModelRoot_A.ECO_ID = Item_A.ECO_ID AND ECOModelRoot_A.TIMESTAMPSTART = Item_A.TIMESTAMPSTART  [/code]&lt;br&gt;&lt;br&gt;The expressionhandle returns all objects (incl the deleted ones) and looking at the SQL I see that there is no comparison with TIMESTAMPSTOP. It will get the latest result, also when its TIMESTAMPSTOP value is set.&lt;br&gt;&lt;br&gt;If I have an error in the project, I do not know at the moment where it is :)&lt;br&gt;&lt;br&gt;I also have inheritance in the main-project, not in the attached testproject.&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Johannes</description><pubDate>Sat, 01 May 2010 14:21:20 GMT</pubDate><dc:creator>Johannes Klos</dc:creator></item><item><title>RE: Deleting versioned class</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5168-4-1.aspx</link><description>Johannes,&lt;/P&gt;&lt;P&gt;first of all, we are using versioning with ECO3 and there are a lot people that are also using versioning. Deleting objects works for us and so I think that there is no basic problem within ECO.&lt;/P&gt;&lt;P&gt;So we have to find out, what's going wrong for you. I am wondering about following:&lt;/P&gt;&lt;P&gt;1) Versioning usually needs a TIMESTAMPSTART column in the table which corresponds with the value of the column TIMESTAMPSTART in table ECOMODELROOT. &lt;BR&gt;2) The created SQL needs a join with ECOMODELROOT to get the current objects. Join columns have to be ECOID and TIMESTAMPSTART, in the where clause TIMESTAMPSTOP is compared to MAXINT. Please try following: Find out which SQL is generated for your OCL statement "CL_Rezeptur.AllInstances" and post this SQL here. Your SQL is loading a specific object. While doing AllInstances you should only get the IDs of the objects.&lt;BR&gt;3) There must be a wrong setting somewhere in your configuration but with your current error description I cannot imagine where the error is. Have you switched on versioning in Modlr for this specific class (value of attribute "versioned" must be set to true)?&lt;BR&gt;4) Have you got inheritance in you model?</description><pubDate>Sat, 01 May 2010 00:20:40 GMT</pubDate><dc:creator>Peter Buchmann</dc:creator></item><item><title>RE: Deleting versioned class</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5168-4-1.aspx</link><description>Hi,&lt;br&gt;&lt;br&gt;I created a testproject which shows the same error.&lt;br&gt;&lt;br&gt;Running expressionhandle versus OCLPSHandle results in different results:&lt;br&gt;expresisonhandle returns the amount of objects (incl the deleted ones) so for example 3 (2 "excisting" and 1 deleted)&lt;br&gt;OCLPS returns for example 5 (incl. older "versioned" objects..)&lt;br&gt;&lt;br&gt;What can I do? This way, it is hard to use Eco with versioning...&lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Johannes</description><pubDate>Fri, 30 Apr 2010 16:39:13 GMT</pubDate><dc:creator>Johannes Klos</dc:creator></item><item><title>RE: Deleting versioned class</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5168-4-1.aspx</link><description>Hi Peter,&lt;/P&gt;&lt;P&gt;I am using an expression handle, which I assume is using OCL and not OCLPS???&lt;/P&gt;&lt;P&gt;The OCL-Query is &lt;EM&gt;self.produktionsDaten.Rezeptur&lt;/EM&gt; which returns a list of &lt;EM&gt;Rezeptur&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;Maybe we should reopen a new Mantis for it?&lt;/P&gt;&lt;P&gt;Thanks, (Dankeschön!!)&lt;BR&gt;Johannes</description><pubDate>Fri, 30 Apr 2010 08:55:16 GMT</pubDate><dc:creator>Johannes Klos</dc:creator></item><item><title>RE: Deleting versioned class</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5168-4-1.aspx</link><description>Hi Johannes,&lt;/P&gt;&lt;P&gt;are you using OCL or OCLPS for querying the data? Please recognize that only OCL ist working correctly for versioned classes.&lt;BR&gt;You cannot use OCLPS for versioned classes as it shows such errors. &lt;/P&gt;&lt;P&gt;And now in our boths mother language:&lt;/P&gt;&lt;P&gt;Ich habe dazu vor Jahren einen Mantis-Fehler (#480) eröffnet, der immer noch nicht gelöst wurde. (I opened a mantis bug #480 years ago for this issue which is not solved for now).</description><pubDate>Fri, 30 Apr 2010 01:21:34 GMT</pubDate><dc:creator>Peter Buchmann</dc:creator></item><item><title>RE: Deleting versioned class</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5168-4-1.aspx</link><description>Hi Peter,&lt;P&gt; &lt;P&gt;I had a close look and it looks like a wrong SQL-phrase.&lt;P&gt;The TIMESTAMPSTOP ist set to 2147483647 (MAXINT) before deleting, and 14 (or a different value, depending on the state of th DB of course) after deleting the object and the class is set to versioned in the model (I switched UseClockLog,UseTimestampColoumn and usetimestamptable to true in the p-mapper) &lt;P&gt; &lt;P&gt;I had SQL profiler running while loading the data and the sql which is used to get the list is this one:&lt;P&gt;[code]exec sp_executesql N'&lt;BR&gt;SELECT Rezeptur_A.ECO_ID, Rezeptur_A.ECO_TYPE, Rezeptur_A.ProduktionsDaten, Rezeptur_A.LastModifiedTime, Rezeptur_A.CreatedTime, Rezeptur_A.CreatedBy, Rezeptur_A.LastModifiedBy, Rezeptur_A.Edukt, Rezeptur_A.EduktName &lt;/P&gt;&lt;P&gt;FROM Rezeptur Rezeptur_A &lt;/P&gt;&lt;P&gt;WHERE Rezeptur_A.ProduktionsDaten = @ID0',N'@ID0 uniqueidentifier',@ID0='B8BA38E3-51F3-4E94-A197-5E835EFF43F3'&lt;BR&gt;[/code]&lt;/P&gt;&lt;P&gt;The ID0 is the correct ID for the single object which has multiple &lt;EM&gt;Rezeptur&lt;/EM&gt; classes (sorry that the data is in german)&lt;/P&gt;&lt;P&gt;It seems that ECO is not adding the TIMESTAMPSTOP&amp;lt;&amp;gt;MAXINT to the SQL-query. How can I do this?&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR&gt;Johannes</description><pubDate>Thu, 29 Apr 2010 14:52:15 GMT</pubDate><dc:creator>Johannes Klos</dc:creator></item><item><title>RE: Deleting versioned class</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5168-4-1.aspx</link><description>This could have several reasons (we are using versioning since years and never had problems, so what I'm now wrinting is hypothetical):&lt;/P&gt;&lt;P&gt;* Is TIMESTAMPSTOP set to a value less than MAXINT? I would assume this now.&lt;BR&gt;* The class must be set to be versioned in the model.&lt;BR&gt;* ECO shouldn't see your deleted objects as it creates SQLs that only show objects that have a TIMESTAMPSTOP with value MAXINT in table ECOMODELROOT. So please check the generated SQL (maybe with debugger).&lt;BR&gt;* Please post this SQL. I think we can find the error when we have the SQL.</description><pubDate>Wed, 28 Apr 2010 01:16:48 GMT</pubDate><dc:creator>Peter Buchmann</dc:creator></item><item><title>RE: Deleting versioned class</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5168-4-1.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;the TIMESTAMPSTOP is set, but the dataset is not deleted, which I suppose should not be deleted anyhow. &lt;/P&gt;&lt;P&gt;What is wrong?&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR&gt;Johannes</description><pubDate>Tue, 27 Apr 2010 13:24:36 GMT</pubDate><dc:creator>Johannes Klos</dc:creator></item><item><title>RE: Deleting versioned class</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5168-4-1.aspx</link><description>Hi Johannes,&lt;/P&gt;&lt;P&gt;deleting a versioned object is done by setting the value TIMESTAPTSTOP in table ECOMODELROOT. &lt;BR&gt;Please check if this value is set for the deleted object (seach for ECOID). &lt;BR&gt;Maybe check which SQL is generated by deleting the object.</description><pubDate>Mon, 26 Apr 2010 21:28:45 GMT</pubDate><dc:creator>Peter Buchmann</dc:creator></item><item><title>Deleting versioned class</title><link>http://www.capableobjects.com/apps/InstantForum414/Topic5168-4-1.aspx</link><description>Hi,&lt;br&gt;&lt;br&gt;I have a 1..n association between two classes, both are versioned. I want to remove one  item from the list and delete it. I do the following:&lt;br&gt;item.AsIObject().Delete();&lt;br&gt;&lt;br&gt;The object dissappears in the list and I save the ecospace. After restaring the program, it is in the list again.&lt;br&gt;&lt;br&gt;Am I doing something wrong?&lt;br&gt;&lt;br&gt;Thank you,&lt;br&gt;Johannes</description><pubDate>Mon, 26 Apr 2010 19:30:34 GMT</pubDate><dc:creator>Johannes Klos</dc:creator></item></channel></rss>
