Giter Club home page Giter Club logo

Comments (9)

rivantsov avatar rivantsov commented on August 29, 2024

I will look at it, but I need some more context. How the update operation was constructed? This DELETE with Any, it looks like it is made from Linq and then scheduled for execution on SaveChanges? Pls provide some pseudo code or general sequence what was going on

from vita.

suchym avatar suchym commented on August 29, 2024

VITA_UPDATE Script.pptx
The presentation will show you very briefly what Pathway, Place, Transition, and Edge represent.
In the second slide, you can see that one place and one transition, along with two edges (not visible), are removed.

The Pseudo code looks like this:
Find what changed (removed place, transition, and two edges)
This code is executed for each entity

public void Delete(IList<int> identifiers)
        {
            if (identifiers == null || !identifiers.Any())
                return;

            foreach (var pk in identifiers.Select(identifier => Session.CreatePrimaryKey<TEntity>(identifier)))
            {
                Delete(pk);
            }
        }
public TEntity Delete(object id)
        {
            Entity = this.GetEntity(id);
            if (Entity == null) return null;
            Session.DeleteEntity(Entity);
            return Entity;
        }

....
....
and then this line is called at the end
Session.SaveChanges();

Place, transition contains one identifier and edges two, the script is generated correctly from my point of view but only the semicolon is missing.
Pathway is updated due to modify date.

from vita.

suchym avatar suchym commented on August 29, 2024

I ran the 'TestMics_DeleteMany' test and the command text is without ;
You can see the delete script:

DELETE FROM misc."Driver" 
    WHERE "Id" = ANY(@P0)

In this case, missing semicolon doesn't matter.

from vita.

rivantsov avatar rivantsov commented on August 29, 2024

wow, fancy chemistry! ok, got it, will look at it over weekend and push the fix

from vita.

rivantsov avatar rivantsov commented on August 29, 2024

pushed fix, v 3.5.1, should be working now

from vita.

suchym avatar suchym commented on August 29, 2024

The problem persists even after updating VITA to 3.5.1. version:

UPDATE pathway."Pathway"
    SET "ModifyDate" = '2023-02-06T19:09:20.07359', "Timestamp" = '2023-02-06T20:09:15.20968'
    WHERE "Id" = 1;
DELETE FROM pathway."Edge" 
    WHERE "Id" = ANY(@P0)
DELETE FROM pathway."Place" 
    WHERE "Id" = 3;
DELETE FROM pathway."Transition" 
    WHERE "Id" = 2;

from vita.

rivantsov avatar rivantsov commented on August 29, 2024

sorry, looking at it...

from vita.

rivantsov avatar rivantsov commented on August 29, 2024

fixed, pushed 3.5.2, try it

from vita.

suchym avatar suchym commented on August 29, 2024

It works. Thank you very much for the fix.

from vita.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.