Giter Club home page Giter Club logo

blueprint41's Issues

Any way to query data from multiple nodes and return it all as one row?

For example, in our data structure we have Areas related to our business model which contain many ZipCodes and then each ZIpCode is associated with a City which is associated with a State. I would like to be able to take in a single Area Uid and then return a list of ZipCodes, the City Name it's in, and the state abbreviation.

What I'm looking for it to do something like this:

                var zipQuery = Transaction.CompiledQuery.Match(Node.ZipCode.Alias(out var zipCode)
                    .In.ZIPCODE_LOCATED_IN_CITY.Out.City.Alias(out var city).In.CITY_LOCATED_IN_STATE.Out.State.Alias(out var state))
                    .Match(Node.ContractorServiceArea.Alias(out var serviceArea).Out.INCLUDES_ZIP.In.ZipCode.Alias(out zipCode))
                    .Where(serviceArea.Uid == Parameter.New<string>("serviceAreaUid"))
                    .Return(zipCode.Zip, state.Abbr, city.Name)
                    .Compile();

Which generates the exact cypher I'd like to be able to run, but cannot figure out a way to run this query which might return the correct anonymous data types. I only see the
.LoadWhere()

queries on the created OGM objects.

I also honestly cannot tell the benfits of putting in multiple values in the .Return method either. It always seems like the return values are going to be attempted to be parsed into whatever static method you're running the .LoadWhere from.

Am I missing something or is this just a limitation of blueprint41?

Enterprise Only features

I am using the free version of Neo4J and am trying to run through the Getting Started.

When I call model.Execute(true) I'm getting the following error:

DatabaseException: Unable to create Constraint( type='NODE PROPERTY EXISTENCE', schema=(:Person {Uid}) ):
Property existence constraint requires Neo4j Enterprise Edition

Is there a way to disabled the Enterprise features like Node Property Existence constraints?

Relationship Events are never fired

When trying to tap into events for Relationships I am unable to trigger them.

Relations["MY_RELATIONSHIP"].Events.OnRelationCreate += Events_OnRelationCreated;

Will never trigger. When I look at the source code I cannot see anything calling the "RaiseOnRelationCreate" event or any of the other ones. Is this intentional? Is there a way to get around this in the current version of blueprint41?

Review datastore backing types

Some issues emerged due to backward compatibility with earlier Neo4j version.

Issue: The dotnet "decimal" type is currently stored as a fixed-point "long" in Neo4j.
Solution: Add a feature to switch the behavior so decimals can optionally get stored as floating point numbers

Issue: The dotnet "DateTime" type is currently stored as a epoch "long" in Neo4j.
Solution: Add a feature to switch the behavior so DateTime can optionally get stored as "Neo4j DateTime" numbers

Issue: The dotnet "TimeSpan" type is currently unsupported.
Issue: The dotnet "Point" type is currently unsupported.

Issue: How could we change the default (for DateTime for example) without causing trouble for existing databases?

Is there a way to write custom neo4j code or execute stored procs using blueprint41?

So far most of the functionality I've needed from an ORM seems to be available in blueprint41 but there are times when certain methods aren't available (or not easily found in the documentation).

Off the top of my head I can't figure out ways to do UNWINDs or
WHERE NOT in a relationship ex:
MATCH (p:person) WHERE NOT (p)-[:executes]-(:transaction) RETURN p

We've been able to manage by finding alternative ways to approach these problems but there are some times when just writing some neo4j would be easier. Is there a way to access the bolt driver itself for times when I have to do this? Are there any plans for updates that allow stored procedures to be added into the datastore?

Memgraph unique constraint not created

Kind of issue

  • Regression
  • Bug report
  • Feature request
  • Documentation issue or request

In which operating systems have you tested?

  • Windows
  • Linux
  • MacOS

Hello !

I'm actually creating a node entity in the blueprint datastore, this way :
image

I want to create a unique constraint on the ID key field, but the SetKey prevent such creation. By removing the setkey, the constraint is successfully created.

Expected Behavior

When the server is started, the database should contain a constraint when using the SetKey on a unique constrained property.

Optimize deletion of files in the new code generator

Currently it deletes all existing files and then rebuilds the ones that are needed.

To reduce TFS spending time to scan for changes between locally updated files and the TFS server:

  • We like to instead have the existing files scanned and only write changes to files that are actually changed.
  • Then we can scan the folder and remove files and folders that should not be there.

Cannot create properties on relationships

There doesn't appear to be a way to define properties on a relationship. In the movie example there is a property called 'roles' on the relationship between an actor and a movie.

On your wiki it looks like the 'roles' property has become a new node type instead of a property on the relationship itself. Is there a way to have properties on relationships? Defining an extra node to hold properties on a relationship seems like it could become inefficient by adding an extra step in path traversal.

Memgraph Index on unique constraints

Kind of issue

  • Regression
  • Bug report
  • Feature request
  • Documentation issue or request

In which operating systems have you tested?

  • Windows
  • Linux
  • MacOS

Hello !

I'm actually creating a node entity in the blueprint datastore, this way :
image

I'm creating 3 unique indexed property, but, when I start the server for the first time, there are no indexes created for those properties. By reading the memgraph documentation, it doesn't works the same way as neo4j (which creates automatically the index on a unique constraint)
image

To corroborate what the documentation is saying, I ran a Read Query integration test with 66.000 nodes in the database. With the constraint without index, the test takes 30ms. With the constraint and the manually created index, the test takes 6ms.

Expected Behavior

When the server is started, the database should contain an index for each of my unique constraint

Solution stopped compiling

Is it possible that there was a breaking change with the last update?

My Generated project stopped compiling today... there were no changes to the model. I noticed it when I tried to build the solution. I also noticed that there was an update to the NuGet package on Feb 20

The error is: CS1503 Argument 1: cannot convert from Blueprint41.Property to Blueprint41.EntityProperty.

Additionally, there are errors saying that Node.EventAction is obsolete.

Finally, there are errors that "EventAction" does not contain a definition for Uid and no accessible extension method 'Uid' accepting a first argument of time 'EventAction' could be found

Both BluePrint41 and Neo4j Driver packages are on the latest version 1.1.0.

Error running Getting Started Tutorial

When the program runs to transaction.commit (); throwing wrong:Due to an unexpected state of the neo4j transaction, it seems impossible to insert the Person at this time.

Running with github action

Kind of issue

  • Regression
  • Bug report
  • Feature request
  • Documentation issue or request

In which operating systems have you tested?

  • Windows
  • Linux (ubuntu-latest)
  • MacOS

Hello !

I was setting up a github action for my dotnet project using blueprint41 and, while trying to run I encountered a problem with the Blueprint41.Build.Json.

Unhandled exception. System.IO.FileNotFoundException: Target folder '/home/runner/work/Astreis/Astreis/packages/back/Entities/Entities.Model/..\Entities.Generated' does not exist. Make sure to have a Blueprint41.Build.json with 'generatePath' set in the model project folder.
at Blueprint41.Build.Generator.ValidatePaths(String modelPath, String generatePath)
at Blueprint41.Build.Generator.Main(String[] args)
Aborted (core dumped)

How to fix it

To fit it, I had to modify the generatePath field from "..\Entities.Generated" -> "..//Entities.Generated". Doing so doesn't cause any problems on windows, where I'm developing.

A bunch'a questions

Reaching out to the rockstars of Neo4j, for your wisdom, and expertise!

  • Is it possible to pass a transaction from one function to another, or one class to another?
  • Is it possible to commit part of a transaction, do some more stuff, and then commit the rest?
  • Is it possible to eager load members rather than lazy load them?
  • Is it possible to patch update an attribute of a node rather than do a full update of the node?
  • What kinds of event handlers are available?
  • Maybe using event handlers, is there a good pattern for building an in-memory self-updating copy of the database (or parts of it), so I don't have to hit the database on every read?

Missing "Generate.tt" file

Hi, I just tried to Blueprint41 to generate source code.
I first installed the extension and generated a new project.
Everything looks correct except that "Generate.tt" file is missing from the generated project.
Do you know what's going on?
I'm on VS 2022 Community.
Thanks.

Logging doesn't work

When you initialize your provider with:

            PersistenceProvider.CurrentPersistenceProvider =
                new Neo4JPersistenceProvider(XXX, XXX, XXX , withLogging: true);

The log file never gets created or written to. In Logger.cs this line:

m_LogDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory ?? @"C:\", "TransactionLogs");

needs to be

LogDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory ?? @"C:\", "TransactionLogs");

So the setter get called successfully and the LogFile property gets set.

Neo4j V5 Update

Hi,
Do you have any plan to release the new package with supports Neo4J V5, the current plugin is breaking in V5.
Thanks

Asynchronous API

Can you please tell me the reason for the lack of an asynchronous API for writing and reading, or simply did not have time to implement it?

p.s. only recently started looking towards graph databases and Neo4j in particular and did not find anything more convenient than your project

PersistenceProvider.CurrentPersistenceProvider error with database parameter

Hi ,
I am trying to connect to database, when i try to connect with the below code with database parameter it errors. Can you help me to fix it as there was not documentation with this parameter. i used DatabaseName as "test".
I am using neo4j v4.4.15 and blueprint41 v1.0.21, Blueprint41.Neo4jDriver.v4 v1.0.21 and blueprint41-4.0.2.jar file

// using v4
using Blueprint41.Neo4j.Persistence.Driver.v4;

PersistenceProvider.CurrentPersistenceProvider = new Neo4jPersistenceProvider(
            settings.GraphDatabase.ConnectionString,
            settings.GraphDatabase.UserName, settings.GraphDatabase.Password,
            settings.GraphDatabase.DatabaseName);
        var model = new Datastore();
        model.Execute(true); 

I am getting the below exception:

System.AggregateException: One or more errors occurred. (Invalid input ':': expected <init> (line 1, column 1 (offset: 0))
":use test"
 ^)
 ---> Neo4j.Driver.ClientException: Invalid input ':': expected <init> (line 1, column 1 (offset: 0))
":use test"
 ^
   at Neo4j.Driver.Internal.MessageHandling.ResponsePipelineError.EnsureThrownIf(Func`2 predicate)
   at Neo4j.Driver.Internal.MessageHandling.ResponsePipelineError.EnsureThrown()
   at Neo4j.Driver.Internal.Result.ResultCursorBuilder.ConsumeAsync()
   at Neo4j.Driver.Internal.AsyncTransaction.DiscardUnconsumed()
   at Neo4j.Driver.Internal.AsyncTransaction.RollbackAsync()
   at Neo4j.Driver.Internal.AsyncTransaction.RollbackAsync()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at Blueprint41.Core.AsyncHelper.WaitEx[T](T task, Boolean recursive)
   at Blueprint41.Core.CustomTask.Wait(Boolean recursive)
   at Blueprint41.Core.CustomTaskScheduler.RunBlocking(Func`1 work, String description)
   at Blueprint41.Neo4j.Persistence.Driver.v4.Neo4jTransaction.RollbackInternal()
   at Blueprint41.Transaction.Rollback()
   at Blueprint41.Transaction.Cleanup()
   at Blueprint41.Core.DisposableScope`1.Dispose()
   at Blueprint41.Neo4j.Persistence.Driver.v4.Neo4jPersistenceProvider.get_Driver()
   at Blueprint41.Neo4j.Persistence.Driver.v4.Neo4jTransaction.Initialize()
   at Blueprint41.Core.DisposableScope`1.Attach()
   at Blueprint41.Transaction.Begin(Boolean readWriteMode, OptimizeFor mode)
   at Blueprint41.Transaction.Begin(Boolean readWriteMode)
   at Blueprint41.DatastoreModel.Execute(Boolean upgradeDatastore, MethodInfo unitTestScript, Predicate`1 predicate, Boolean standAloneScript)
   at Blueprint41.DatastoreModel.Execute(Boolean upgradeDatastore, MethodInfo unitTestScript)
   at Blueprint41.DatastoreModel.Execute(Boolean upgradeDatastore)

Should Blueprint41.Neo4j.Persistence.Void.Neo4jTransaction.Run be doing something?

Looking at this library to assess it's viability for a neo4j orm. I'm having some difficulty doing the movies example from the wiki. I find in my program.cs when I run Model.Execute(true); I get the error Due to an unexpected state of the neo4j transaction, it seems impossible to insert the Genre at this time

I traced this down to Blueprint41.Neo4j.Persistence.Void.Neo4jNodePersistenceProvider.Insert:171; there is a check to see if the result of a transaction is empty; but it appears that the Blueprint41.Neo4j.Persistence.Void.Neo4jTransaction.Run function doesn't actually do anything other than construct an empty Neo4jRawResult object which would always result an in empty result. Am I doing something wrong here?

Cannot find blueprint41 procedures after upgrading to 4.0.*

I've been working on a local database using neo4j 3.5.5 and blueprint41 for a few weeks now and decided to spin up an instance for hosting in AWS using the newer version of 4.0.4. Spent a little while trying to get it configured and eventually found that none of the procedures in the blueprint41 jar file are being loaded. I run the following query to see all the procedures and can see all the apoc ones fine but none of the blueprint41 ones:

CALL dbms.procedures() YIELD name
RETURN head(split(name,".")) as package, count(*), collect(name) as procedures;

To test to make sure it is a difference between the versions I went and ran this query against my local graph while running 3.5.5, I did see the blueprint41 procedures in the list, then I upgraded my local version, confirmed the settings are still in place and the plugin is still available, but am still not seeing any of the blueprint41 procedures.

Is the current plugin not available with newer versions of Neo4j?

Custom Logging in v4 Neo4jPersistenceProvider not working

Hi,
I used PersistenceProvider(v4) advancedConfig parameter customLogger property to enable logging but still the information about the transaction and database connection details are not getting logged. Is there a way to enable logging if we use blueprint41? if somethings goes wrong we need the logs to investigate the issue
var config = new AdvancedConfig() { SimpleLogging = false, CustomLogging= s => logger.Error(s) }; PersistenceProvider.CurrentPersistenceProvider = new Neo4jPersistenceProvider( settings.GraphDatabase.ConnectionString, settings.GraphDatabase.UserName, settings.GraphDatabase.Password, advancedConfig: config);

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.