Giter Site home page Giter Site logo

Use as Symfony service about orientdb-odm HOT 9 OPEN

genietto84 avatar genietto84 commented on August 16, 2024
Use as Symfony service

from orientdb-odm.

Comments (9)

Garani71 avatar Garani71 commented on August 16, 2024

I have the same issue: there is a name space as such, but not the class.

Running Symfony 2.6

from orientdb-odm.

odino avatar odino commented on August 16, 2024

I think that's quite an old article, and @mitom changed the implementation of how we map stuff in this pr...hope it helps :) @mitom do you have an example configuration for the guys?

from orientdb-odm.

odino avatar odino commented on August 16, 2024

Also, if you guys dont mind and wanna play around with it you can use the beta 7 which still relies on the old API

from orientdb-odm.

Garani71 avatar Garani71 commented on August 16, 2024

Ok, let me get this straight...

  • Old Beta 7 are symfony compliant, other then having to write a service.
  • Master in not symfony compliant.

Other then the refactoring and proxies, Beta7 and Master are pretty much the same?

Well, that and the fact that beta 7 downgrades doctrine to 2.3.x and symfony to 2.6.1, and the symfony cache goes berserk because cannot flush when downgrading. -- I stand corrected: if you re-run compser it actually re-upgrades symfony to 2.6.4, solving the cache issues.

from orientdb-odm.

mitom avatar mitom commented on August 16, 2024

The new configuration is at the moment quite ugly I'd say (I still think it's better than before, but the refactoring I started is incomplete and halted due to a bug). Oh and there is no such thing as symfony compliant.
As for an example for symfony:

odb.binding_paramters:
    class: Doctrine\OrientDB\Binding\BindingParameters
    arguments: ["host", "port", "username", "password", "database"]

odm.binding:
    class: Doctrine\OrientDB\Binding\HttpBinding
    arguments: ["@odb.binding_parameters"]

odm.configuration:
    class: Doctrine\ODM\OrientDB\Configuration
    arguments: [{
        "document_dirs": ["dir1", "dir2"],
        "proxy_dir": "path/to/dir"
    }]

odm.manager:
    class: Doctrine\ODM\OrientDB\Manager
    arguments: ["@odm.binding", "@odm.configuration"]

I don't have a symfony installation handy to test it though. A few extra notes:

  • This could be much shorter in definition, if instead of 4 services there would be a factory, to which all the options are passed and it returns a Manager.
  • Check Doctrine\ODM\OrientDB\Configuration to see how to pass the arguments.
  • In case you need serialization (which is likely if you wanna use this for users) you will need to autoload your entity classes. This is usually taken care of in the bundle for these components, but since there's no bundle for this yet, you have to do it on your own. Take a look at the mongodb one to see how it's done.

from orientdb-odm.

Garani71 avatar Garani71 commented on August 16, 2024

Well, I have always been "in and out" of Symfony, since 1.0, after all my daily job isn't programming.

I'll have a look at things as they stand (gotta catch up on symfony 2.6 too) and see what could be "adjusted". I am also quite new to OrientDB/NoSQL arena, so I still am thinking in a very RDBMSesque way, and as such I would love to have the Doctrine's help in dealing with data.

Maybe by adapting the bundle that was made some time ago, but for another symfony version, I can hack something out.

from orientdb-odm.

mitom avatar mitom commented on August 16, 2024

@Garani71 if you simply need a nosql document manager that actually makes your life easier, I'd go with mongodb as it has a more mature implementation. This one AFAIK is pretty much in beta, so it will likely cause you more problems than what it solves.

from orientdb-odm.

odino avatar odino commented on August 16, 2024

confirmed :)

from orientdb-odm.

Garani71 avatar Garani71 commented on August 16, 2024

Thanks for the thoughts. What i see is a graph of devices, and that can't quite be replicated in a Document DB, imho, and quite a pain to do in an SQL db.

Of course I do need to store "document" data as well, and I have that in XML mostly. And MongoDB would force me to get into the XML and pull the info out. Something I would have to do anyhow, but it's the graphing part that is a killer: I really want those vertexes and edges. :)

from orientdb-odm.

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.