-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to use \AlgoWeb\PODataLaravel\Models\MetadataTrait; #175
Comments
you need to write this line in place of use MetadataTrait; |
@yuri1994 , "userlocation" is the name of the entity type, while "userlocations" , plural, is the endpoint by default. The base endpoint of odata.svc will give you a list of endpoints. @dsv4890 , real life has caught up with me, I'm currently too busy to look at your issue. Thank you for jumping in on this one. |
@CyberiaResurrection, when i call base endpoint it return me |
i gone to debug and i found pice of code where checked for classes with MetadataTrait and then expect this class to be instance of Controller class, but in case the real instance is Model class. |
What's your metadata returning? odata.svc/$metadata Have you hooked the service providers up? |
$metadata
i put the providers in config/app.php
|
just to tick off the obvious things first. have you migrated? what database engine are you using? |
i use Firebird database engine Migration file `class Userlocation extends Migration
}` |
Which class in POData project get the name table and make request to database? |
Podata makes no direct requests to the database, they are passed into Podata Laravel via the laravel query provider. In POdata laravel MetadataProvider, is responsible to for fetching the information from models that have the trait. I have not heard of Firebird but will look into it. is there any chance you could dump out the variable passed to the unify method in MetadataProvider? |
@c-harris @CyberiaResurrection |
i try to put \AlgoWeb\PODataLaravel\Models\MetadataTrait in my model class but after call the odata it return me
404
Resource not found for the segment 'userlocation'.The model class is:
use AlgoWeb\PODataLaravel\Models\MetadataTrait;
use Illuminate\Database\Eloquent\Model;
class userlocation extends Model
{
use MetadataTrait;
}
how i can resolve this issue?
The text was updated successfully, but these errors were encountered: