Comments (6)
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.
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 nowith
, I get an error described above - same with no
use
at the top but havingwith
- 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.
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.
@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.
@brtastic, right. I skipped that case, let me see what I can do to fix it.
from raisin.
Should be fixed now with the recent change.
from raisin.
Related Issues (20)
- Ideas to discuss HOT 4
- Improvement: allow swagger to reside behind a reverse proxy
- Request for clarification HOT 3
- Reverse proxy not done correctly HOT 7
- escaping colon in resource path
- please tag recent CPAN releases in git HOT 1
- Regex check in Raisin::Entity flags numbers as strings for JSON::XS
- Bump version to 0.94 please? HOT 3
- route_param regex is broken by R::Routes::Endpoint::_build_regex if contains quantifiers...
- Participate in hacktoberfest?
- question: can Raisin handle file uploads ? HOT 1
- Optional params that fail type constraints do not return "Invalid Parameters" response.
- Encoder/Decoder are unable to cope with UTF-8 / wide characters.
- t/unit/plugin/swagger.t fails (with Type::Tiny 1.006000?) HOT 5
- Feature Request: Swagger schemes
- $count in SYNOPSIS HOT 1
- Please include VERSION in all modules HOT 4
- Authentication module in Raisin HOT 3
- Disable the route extension. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raisin.