Giter VIP home page Giter VIP logo

Comments (3)

MasterMedo avatar MasterMedo commented on May 24, 2024 1

Oh, that's right. Because the database reference is removed from the property name once the User is created. It's an easy fix, when a subclass of Node is being created it can propagate the db object upwards. But then a user would have to define the Streamer as:

class Streamer(User, db):
    pass

The other option is what @jbajic and I talked earlier about, and that is creating a global instance of db that is going to be used everywhere. Very few users are going to use multiple databases, and we should cater the simplicity to the majority.

from gqlalchemy.

MasterMedo avatar MasterMedo commented on May 24, 2024 1

Oh, the functionality I mentioned is not implemented, it's a proposal.
But after giving it some thought, I think db arguments can be completely ignored when subclasses are created because the superclasses already created all constraints/indexes. I'll push a fix for this by the end of day.

from gqlalchemy.

katarinasupe avatar katarinasupe commented on May 24, 2024

Is it possible to add other properties to the Streamer then?
Because, when I try adding the db argument I get the following error:
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

from gqlalchemy.

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.