Comments (5)
Thanks for the report @merouanekhalili, looks like I was getting tripped up by https://github.com/doctrine/dbal/blob/10df50f949c78c1f3666451470183ca01c4c4fa5/src/Schema/AbstractSchemaManager.php#L891 making the names lower case in the associative array. I have fixed this by not relying on that key being the correct name.
from lodata.
I have released https://github.com/flat3/lodata/releases/tag/v3.0.2 with this change. Please re-open this issue if the problem is not solved for you.
from lodata.
Hi Chris,
Thanks for your help.
The new release fix only the discovery step, but when you try to get the data the generated SQL statment is not correct.
I got the below error :
{"@context":"http://127.0.0.1:8000/odata/$metadata#cities","value":[OData-error: {"code":"query_error","message":"The executed query returned an error: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "\"\nLINE 1: SELECT dimensions.\"DIM_CITIES\".
ID` AS ID, dimensions."DIM_C...\n ^","target":null,"details":[],"innererror":{}}
Below the code to test :
dimensions."DIM_CITIES" definition
CREATE TABLE dimensions."DIM_CITIES" ( "ID" int4 NOT NULL, "NAME" varchar NULL, "LATITUDE" float4 NULL, "LONGTITUDE" float4 NULL, CONSTRAINT cities_pkey PRIMARY KEY ("ID") );
app\Providers\AppServiceProvider.php
`<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
$cityType = \Flat3\Lodata\EntityType::factory('city');
$cityType->addDeclaredProperty('ID', \Flat3\Lodata\Type::int64());
$cityType->addDeclaredProperty('NAME', \Flat3\Lodata\Type::string());
$cityType->addDeclaredProperty('LATITUDE', \Flat3\Lodata\Type::double());
$cityType->addDeclaredProperty('LONGTITUDE', \Flat3\Lodata\Type::double());
$citySet = \Flat3\Lodata\Drivers\SQLEntitySet::factory('cities', $cityType)
->setTable('dimensions."DIM_CITIES"')
->discoverProperties();
\Flat3\Lodata\Facades\Lodata::add($citySet);
}
}`
from lodata.
Thanks for the repro code @merouanekhalili, I've released https://github.com/flat3/lodata/releases/tag/v3.0.4 with additional fixes and test cases for these issues.
from lodata.
The issue is fixed, thanks Chris for your help.
from lodata.
Related Issues (20)
- oracle oci8 driver | invalid_driver error HOT 3
- Using nested json objects for filters, set json casts properties as searchable HOT 2
- how to create Relationships Many To Many HOT 2
- Relationship Update Can't Write in Database
- `.idea` (personal) project files not all ignored HOT 1
- Tests broken on Windows HOT 2
- Defining operations without reflection HOT 6
- Dropping support for EOL PHP versions HOT 4
- Problem with any request inside filter
- Is it possible to consume output from this library with openui5? HOT 2
- Parsing $batch POST body fails when connecting via openui5 app HOT 3
- $batch failed - Error: Expected 'OData-Version' header with value '4.0' but received value 'null' in response HOT 3
- Argument #1 ($property) must be of type string, int given HOT 1
- $filter not working when calling from openui5 app HOT 1
- $patch throwing an unknown error on Syncfusion Integration HOT 2
- Add filters in code (SQLEntitySet) HOT 2
- $batch URL is set to http:// instead of the original https:// HOT 2
- Testing with passport HOT 1
- appends in a model are ignored
- Is it possible to return EntitySet from Operation? HOT 4
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 lodata.