GithubHelp home page GithubHelp logo

Comments (6)

bbrtj avatar bbrtj commented on July 30, 2024

I'm not sure why doesn't this work, seen some previous discussion in issues where someone claimed it did actually work, but seems like there been no significant change to this in DBIx::Class recently, and no change in this Raisin code for the last 7 years.

To be precise, I did not run the MusicApp directly, but used its code for my own needs with PostgreSQL. The entities and models are a bit different, but the general way they're used is the same as in MusicApp.

from raisin.

bbrtj avatar bbrtj commented on July 30, 2024

I was missing two things:

  • no use MyApp::Entity::SomeEntity at the top of the file
  • no with => 'MyApp::Entity::SomeEntity' (sort of)

So the behavior is very weird and needs to be patched / documented because looks like a bug at first glance:

  • with use at the top but no with, I get an error described above
  • same with no use at the top but having with
  • only when both of them are present, the behavior is correct
  • nothing was telling me that I'm doing something wrong, only after I've added entity 'MyApp::Entity::SomeEntity'; to API description I was able to spot an issue (since it was telling me that I probably forgot to load the module)

from raisin.

khrt avatar khrt commented on July 30, 2024

Thanks for reporting! The bug was there from the very beginning and must be fixed now.

The new version is released to CPAN as 0.92.

from raisin.

bbrtj avatar bbrtj commented on July 30, 2024

@khrt Thank you, however I still don't think if the change you've introduced is enough, since the chain $data->first->columns_info is erroneous if there are no rows in the result (since it's pretty much undef->columns_info then and there seem to be no checks whether the ResultSet is empty). It would've fixed the non-visible first element in my case, but not the exception with no rows in the database.

from raisin.

khrt avatar khrt commented on July 30, 2024

@brtastic, right. I skipped that case, let me see what I can do to fix it.

from raisin.

khrt avatar khrt commented on July 30, 2024

Should be fixed now with the recent change.

from raisin.

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.