Code Monkey home page Code Monkey logo

Comments (7)

matteobortolazzo avatar matteobortolazzo commented on August 23, 2024 1

Hi,

yes the CouchContext is something new for v2 but it's missing some features.
I will add a model builder.

As a workaround you can use the CouchClient directly.

You can also access the client from the context.

var db = context.Client.GetDatabase<AnotherType>("normalType")

from couchdb-net.

 avatar commented on August 23, 2024

Thanks! The "Client.GetDatabase("normalType")" work around seems does not pickup properties in AnotherType that are not in "normalType"

from couchdb-net.

matteobortolazzo avatar matteobortolazzo commented on August 23, 2024

It's strange because it deserialize AnotherType. Are you sure properties are accessible and exists in the DB? I will add a proper support soon

from couchdb-net.

matteobortolazzo avatar matteobortolazzo commented on August 23, 2024

Maybe I get what you mean. If you call 'ToListAsync' it returns all documents and the ones that are not 'AnotherType' have null properties. Right?

Also, what's you use case for 2 types in 1 DB? So I can understand better how to implement this properly

from couchdb-net.

matteobortolazzo avatar matteobortolazzo commented on August 23, 2024

Hi @ixthnar,

is this still an issue? I need a context to write a better "fix"

from couchdb-net.

matteobortolazzo avatar matteobortolazzo commented on August 23, 2024

Closing this

from couchdb-net.

matteobortolazzo avatar matteobortolazzo commented on August 23, 2024

Implementing in #106

from couchdb-net.

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.