[JBoss JIRA] (TEIID-5593) Add a Java 11 travis build
by Van Halbert (Jira)
[ https://issues.jboss.org/browse/TEIID-5593?page=com.atlassian.jira.plugin... ]
Van Halbert edited comment on TEIID-5593 at 1/15/19 10:05 AM:
--------------------------------------------------------------
See [TEIID-5603] for the dependent issue, as the travis build will fail due to arquillian test failure.
was (Author: van.halbert):
See [TEIID-5603] for the dependent issue.
> Add a Java 11 travis build
> --------------------------
>
> Key: TEIID-5593
> URL: https://issues.jboss.org/browse/TEIID-5593
> Project: Teiid
> Issue Type: Task
> Components: Build/Kits
> Reporter: Steven Hawkins
> Assignee: Van Halbert
> Priority: Major
> Fix For: 12.1
>
>
> We should also build/test with java 11 on travis. This is expected to work for everything but the arquillian tests.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (TEIID-5603) Support of JAVA 11 has failures running arquillian tests
by Van Halbert (Jira)
Van Halbert created TEIID-5603:
----------------------------------
Summary: Support of JAVA 11 has failures running arquillian tests
Key: TEIID-5603
URL: https://issues.jboss.org/browse/TEIID-5603
Project: Teiid
Issue Type: Bug
Components: Build/Kits
Affects Versions: 12.x
Reporter: Van Halbert
Assignee: Steven Hawkins
The normal "release install" build works, unfortunately the arquillian tests fail with following test failures:
{code}
[ERROR] Errors:
[ERROR] IntegrationTestOData4.testCORS:235 » NoClassDefFound javax/xml/bind/JAXBExcept...
[ERROR] IntegrationTestOData4.testCompositeKeyTimestamp:179 » NoClassDefFound javax/xm...
[ERROR] IntegrationTestOData4.testGetDataInGzip:294 » NoClassDefFound javax/xml/bind/J...
[ERROR] IntegrationTestOData4.testOdata:87 » NoClassDefFound javax/xml/bind/JAXBExcept...
[ERROR] IntegrationTestOData4.testOdataMetadataError:210 » NoClassDefFound javax/xml/b...
[ERROR] IntegrationTestOData4.testPutDataInGzip:344 » NoClassDefFound javax/xml/bind/J...
[ERROR] IntegrationTestOData4.testStaticServlet:256 » NoClassDefFound javax/xml/bind/J...
{code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (TEIID-5532) Common table projection minimization does not account for usage in a subquery nested in an aggregate or in some view scenarios
by Johnathon Lee (Jira)
[ https://issues.jboss.org/browse/TEIID-5532?page=com.atlassian.jira.plugin... ]
Johnathon Lee updated TEIID-5532:
---------------------------------
Fix Version/s: 8.12.17.6_4
> Common table projection minimization does not account for usage in a subquery nested in an aggregate or in some view scenarios
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-5532
> URL: https://issues.jboss.org/browse/TEIID-5532
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Blocker
> Fix For: 11.0.3, 11.1.2, 12.0, 11.2.1, 8.12.17.6_4
>
>
> Nesting the usage of a common table in an aggregate means that the columns can be removed inappropriately by projection minimization. A query such as:
> with CTE1 as /*+ no_inline */ (SELECT e1, e2, e3 from pm1.g1)
> select array_agg((select e3 from cte1 where e1=pm1.g2.e1 and e2=pm1.g2.e2)) from pm1.g2
> will return null values for all e3 as projection minimization of CTE1 will replace the column with a null value.
> A similar situation occurs when the query above is defined instead in a view. A similar issue was captured on TEIID-5535
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (TEIID-5599) When creating an entity via POST message, it is expected, that the returned message includes the primary key of the newly created instance. This is not the case currently
by Christoph John (Jira)
[ https://issues.jboss.org/browse/TEIID-5599?page=com.atlassian.jira.plugin... ]
Christoph John commented on TEIID-5599:
---------------------------------------
Hello Steven,
attached you find the vdb xml description:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<vdb name="svc" version="1">
<description/>
<property name="validationDateTime" value="Fri Jan 11 01:38:15 CET 2019"/>
<property name="validationVersion" value="11.2.0"/>
<model name="my_nutri_diary">
<source connection-jndi-name="java:/my_nutri_diary" name="my_nutri_diary" translator-name="mysql"/>
<metadata type="DDL">
<![CDATA[
CREATE FOREIGN TABLE Account (
idProfile long NOT NULL AUTO_INCREMENT OPTIONS(NAMEINSOURCE '`idProfile`', NATIVE_TYPE 'BIGINT UNSIGNED'),
uuidUser string(36) NOT NULL OPTIONS(NAMEINSOURCE '`uuidUser`', NATIVE_TYPE 'CHAR'),
CONSTRAINT "PRIMARY" PRIMARY KEY(idProfile),
CONSTRAINT uuidUser_UNIQUE UNIQUE(uuidUser)
) OPTIONS(NAMEINSOURCE '`Account`', UPDATABLE 'TRUE');
CREATE FOREIGN TABLE Avatar (
fkProfile long NOT NULL OPTIONS(NAMEINSOURCE '`fkProfile`', NATIVE_TYPE 'BIGINT UNSIGNED'),
AvatarImg blob(65535) OPTIONS(NAMEINSOURCE '`AvatarImg`', NATIVE_TYPE 'BLOB'),
CONSTRAINT "PRIMARY" PRIMARY KEY(fkProfile),
CONSTRAINT fkAvatarToAccount FOREIGN KEY(fkProfile) REFERENCES Account(idProfile)
) OPTIONS(NAMEINSOURCE '`Avatar`', UPDATABLE 'TRUE');
CREATE FOREIGN TABLE BodyWeight (
idBodyWeight long NOT NULL AUTO_INCREMENT OPTIONS(NAMEINSOURCE '`idBodyWeight`', NATIVE_TYPE 'BIGINT UNSIGNED'),
fkProfile long NOT NULL OPTIONS(NAMEINSOURCE '`fkProfile`', NATIVE_TYPE 'BIGINT UNSIGNED'),
WeightMeasurementDateTime timestamp NOT NULL OPTIONS(NAMEINSOURCE '`WeightMeasurementDateTime`', NATIVE_TYPE 'DATETIME'),
Weight float NOT NULL OPTIONS(NAMEINSOURCE '`Weight`', NATIVE_TYPE 'FLOAT UNSIGNED'),
CONSTRAINT "PRIMARY" PRIMARY KEY(idBodyWeight),
CONSTRAINT fkBodyWeightToAccount FOREIGN KEY(fkProfile) REFERENCES Account(idProfile)
) OPTIONS(NAMEINSOURCE '`BodyWeight`', UPDATABLE 'TRUE');
CREATE FOREIGN TABLE ConfigOptions (
fkProfile long NOT NULL OPTIONS(NAMEINSOURCE '`fkProfile`', NATIVE_TYPE 'BIGINT UNSIGNED'),
MUnitWeight string(2) DEFAULT 'kg' OPTIONS(NAMEINSOURCE '`MUnitWeight`', NATIVE_TYPE 'ENUM'),
MUnitLength string(2) DEFAULT 'cm' OPTIONS(NAMEINSOURCE '`MUnitLength`', NATIVE_TYPE 'ENUM'),
MUnitEnergy string(4) DEFAULT 'kcal' OPTIONS(NAMEINSOURCE '`MUnitEnergy`', NATIVE_TYPE 'ENUM'),
MUnitLiquids string(2) DEFAULT 'ml' OPTIONS(NAMEINSOURCE '`MUnitLiquids`', NATIVE_TYPE 'ENUM'),
MUnitTime string(3) DEFAULT '24h' OPTIONS(NAMEINSOURCE '`MUnitTime`', NATIVE_TYPE 'ENUM'),
EnableDrinkReminder boolean DEFAULT '0' OPTIONS(NAMEINSOURCE '`EnableDrinkReminder`', NATIVE_TYPE 'BIT'),
PreferredCountryCodeForSearch string(2) DEFAULT 'de' OPTIONS(NAMEINSOURCE '`PreferredCountryCodeForSearch`', NATIVE_TYPE 'VARCHAR'),
EnableInternationalSearch boolean DEFAULT '1' OPTIONS(NAMEINSOURCE '`EnableInternationalSearch`', NATIVE_TYPE 'BIT'),
NumberOfActiveMeals long DEFAULT '4' OPTIONS(NAMEINSOURCE '`NumberOfActiveMeals`', NATIVE_TYPE 'INT UNSIGNED'),
Meal1Name string(45) OPTIONS(NAMEINSOURCE '`Meal1Name`', NATIVE_TYPE 'VARCHAR'),
Meal1StartTime time DEFAULT '00:00:00' OPTIONS(NAMEINSOURCE '`Meal1StartTime`', NATIVE_TYPE 'TIME'),
Meal2Name string(45) OPTIONS(NAMEINSOURCE '`Meal2Name`', NATIVE_TYPE 'VARCHAR'),
Meal2StartTime time DEFAULT '00:00:00' OPTIONS(NAMEINSOURCE '`Meal2StartTime`', NATIVE_TYPE 'TIME'),
Meal3Name string(45) OPTIONS(NAMEINSOURCE '`Meal3Name`', NATIVE_TYPE 'VARCHAR'),
Meal3StartTime time DEFAULT '00:00:00' OPTIONS(NAMEINSOURCE '`Meal3StartTime`', NATIVE_TYPE 'TIME'),
Meal4Name string(45) OPTIONS(NAMEINSOURCE '`Meal4Name`', NATIVE_TYPE 'VARCHAR'),
Meal4StartTime time DEFAULT '00:00:00' OPTIONS(NAMEINSOURCE '`Meal4StartTime`', NATIVE_TYPE 'TIME'),
Meal5Name string(45) OPTIONS(NAMEINSOURCE '`Meal5Name`', NATIVE_TYPE 'VARCHAR'),
Meal5StartTime time DEFAULT '00:00:00' OPTIONS(NAMEINSOURCE '`Meal5StartTime`', NATIVE_TYPE 'TIME'),
Meal6Name string(45) OPTIONS(NAMEINSOURCE '`Meal6Name`', NATIVE_TYPE 'VARCHAR'),
Meal6StartTime time DEFAULT '00:00:00' OPTIONS(NAMEINSOURCE '`Meal6StartTime`', NATIVE_TYPE 'TIME'),
CONSTRAINT "PRIMARY" PRIMARY KEY(fkProfile),
CONSTRAINT fkConfigOptionsToAccount FOREIGN KEY(fkProfile) REFERENCES Account(idProfile)
) OPTIONS(NAMEINSOURCE '`ConfigOptions`', UPDATABLE 'TRUE');
CREATE FOREIGN TABLE Profile (
fkProfile long NOT NULL OPTIONS(NAMEINSOURCE '`fkProfile`', NATIVE_TYPE 'BIGINT UNSIGNED'),
BodyHeight float DEFAULT '0.000' OPTIONS(NAMEINSOURCE '`BodyHeight`', NATIVE_TYPE 'FLOAT UNSIGNED'),
GoalWeight float DEFAULT '0.000' OPTIONS(NAMEINSOURCE '`GoalWeight`', NATIVE_TYPE 'FLOAT UNSIGNED'),
Gender string(1) DEFAULT 'm' OPTIONS(NAMEINSOURCE '`Gender`', NATIVE_TYPE 'ENUM'),
BirthDate date DEFAULT '1980-01-01' OPTIONS(NAMEINSOURCE '`BirthDate`', NATIVE_TYPE 'DATE'),
ActivityLevel string(17) DEFAULT 'strActive' OPTIONS(NAMEINSOURCE '`ActivityLevel`', NATIVE_TYPE 'ENUM'),
CONSTRAINT "PRIMARY" PRIMARY KEY(fkProfile),
CONSTRAINT fkProfileToAccount FOREIGN KEY(fkProfile) REFERENCES Account(idProfile)
) OPTIONS(NAMEINSOURCE '`Profile`', UPDATABLE 'TRUE');
]]>
</metadata>
</model>
<data-role allow-create-temporary-tables="false" any-authenticated="true" grant-all="false" name="odata">
<description/>
<permission>
<resource-name>my_nutri_diary.ConfigOptions</resource-name>
<allow-delete>false</allow-delete>
<condition>ConfigOptions.fkProfile in (SELECT Account.idProfile FROM Account WHERE Account.uuidUser = LEFT(user(), 36))</condition>
</permission>
<permission>
<resource-name>my_nutri_diary.Account</resource-name>
<allow-update>false</allow-update>
<allow-delete>false</allow-delete>
<condition>Account.uuidUser = LEFT(user(), 36)</condition>
</permission>
<permission>
<resource-name>my_nutri_diary.Profile</resource-name>
<allow-delete>false</allow-delete>
<condition>Profile.fkProfile in (SELECT Account.idProfile FROM Account WHERE Account.uuidUser = LEFT(user(), 36))</condition>
</permission>
<permission>
<resource-name>my_nutri_diary</resource-name>
<allow-create>true</allow-create>
<allow-read>true</allow-read>
<allow-update>true</allow-update>
<allow-delete>true</allow-delete>
<allow-execute>false</allow-execute>
<allow-alter>false</allow-alter>
</permission>
<permission>
<resource-name>my_nutri_diary.BodyWeight</resource-name>
<condition>BodyWeight.fkProfile in (SELECT Account.idProfile FROM Account WHERE Account.uuidUser = LEFT(user(), 36) )</condition>
</permission>
<permission>
<resource-name>sysadmin</resource-name>
<allow-create>false</allow-create>
<allow-read>false</allow-read>
<allow-update>false</allow-update>
<allow-delete>false</allow-delete>
<allow-execute>false</allow-execute>
<allow-alter>false</allow-alter>
</permission>
</data-role>
</vdb>
> When creating an entity via POST message, it is expected, that the returned message includes the primary key of the newly created instance. This is not the case currently
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-5599
> URL: https://issues.jboss.org/browse/TEIID-5599
> Project: Teiid
> Issue Type: Bug
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Critical
> Fix For: 12.1
>
>
> The following communication shows the issue. What I am doing here is to create a new Account entity via post request. My underlaying mysql database requires the primary key in the table to be set to NN (not null), hence, a value must be provided. Moreover the primary key is set to autoincrement and is generated by the database. The only execepted value here seems to be, to provide the key with value=0. The object is created in the database as expected. However, Teiid answers with the created object, but again with the primary key (idProfile) set as zero, instead to provide the newly created primary key.
> POST Account HTTP/1.1
> Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true
> Accept-Language:de-DE
> Content-Type:application/json;charset=UTF-8;IEEE754Compatible=true
> {"uuidUser":"65820574-7525-463b-9d20-5ee133a06b94","idProfile":"0"}
> --batch_id-1547485733072-21
> Content-Type:application/http
> Content-Transfer-Encoding:binary
> The response:
> HTTP/1.1 201 Created
> Location: http://localhost/odata4/svc/my_nutri_diary/Account(0)
> Content-Type: application/json;ieee754compatible=true;odata.metadata=minimal
> Content-Length: 147
> {"@odata.context":"http://localhost/odata4/svc/my_nutri_diary/$metadata#Account","idProfile":"0","uuidUser":"65820574-7525-463b-9d20-5ee133a06b94"}
> --batch_e834eb7c-df0d-4e22-a423-78cd3638955f
> Content-Type: application/http
> Content-Transfer-Encoding: binary
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (TEIID-5599) When creating an entity via POST message, it is expected, that the returned message includes the primary key of the newly created instance. This is not the case currently
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5599?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5599:
----------------------------------
Fix Version/s: 12.1
> When creating an entity via POST message, it is expected, that the returned message includes the primary key of the newly created instance. This is not the case currently
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-5599
> URL: https://issues.jboss.org/browse/TEIID-5599
> Project: Teiid
> Issue Type: Bug
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Critical
> Fix For: 12.1
>
>
> The following communication shows the issue. What I am doing here is to create a new Account entity via post request. My underlaying mysql database requires the primary key in the table to be set to NN (not null), hence, a value must be provided. Moreover the primary key is set to autoincrement and is generated by the database. The only execepted value here seems to be, to provide the key with value=0. The object is created in the database as expected. However, Teiid answers with the created object, but again with the primary key (idProfile) set as zero, instead to provide the newly created primary key.
> POST Account HTTP/1.1
> Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true
> Accept-Language:de-DE
> Content-Type:application/json;charset=UTF-8;IEEE754Compatible=true
> {"uuidUser":"65820574-7525-463b-9d20-5ee133a06b94","idProfile":"0"}
> --batch_id-1547485733072-21
> Content-Type:application/http
> Content-Transfer-Encoding:binary
> The response:
> HTTP/1.1 201 Created
> Location: http://localhost/odata4/svc/my_nutri_diary/Account(0)
> Content-Type: application/json;ieee754compatible=true;odata.metadata=minimal
> Content-Length: 147
> {"@odata.context":"http://localhost/odata4/svc/my_nutri_diary/$metadata#Account","idProfile":"0","uuidUser":"65820574-7525-463b-9d20-5ee133a06b94"}
> --batch_e834eb7c-df0d-4e22-a423-78cd3638955f
> Content-Type: application/http
> Content-Transfer-Encoding: binary
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (TEIID-5599) When creating an entity via POST message, it is expected, that the returned message includes the primary key of the newly created instance. This is not the case currently
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5599?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5599:
---------------------------------------
> I am not sure what you mean with Teiid/source metadata, would the vdb export as xml help you here?
Yes that would allow me to better reproduce this.
> When creating an entity via POST message, it is expected, that the returned message includes the primary key of the newly created instance. This is not the case currently
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-5599
> URL: https://issues.jboss.org/browse/TEIID-5599
> Project: Teiid
> Issue Type: Bug
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Critical
> Fix For: 12.1
>
>
> The following communication shows the issue. What I am doing here is to create a new Account entity via post request. My underlaying mysql database requires the primary key in the table to be set to NN (not null), hence, a value must be provided. Moreover the primary key is set to autoincrement and is generated by the database. The only execepted value here seems to be, to provide the key with value=0. The object is created in the database as expected. However, Teiid answers with the created object, but again with the primary key (idProfile) set as zero, instead to provide the newly created primary key.
> POST Account HTTP/1.1
> Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true
> Accept-Language:de-DE
> Content-Type:application/json;charset=UTF-8;IEEE754Compatible=true
> {"uuidUser":"65820574-7525-463b-9d20-5ee133a06b94","idProfile":"0"}
> --batch_id-1547485733072-21
> Content-Type:application/http
> Content-Transfer-Encoding:binary
> The response:
> HTTP/1.1 201 Created
> Location: http://localhost/odata4/svc/my_nutri_diary/Account(0)
> Content-Type: application/json;ieee754compatible=true;odata.metadata=minimal
> Content-Length: 147
> {"@odata.context":"http://localhost/odata4/svc/my_nutri_diary/$metadata#Account","idProfile":"0","uuidUser":"65820574-7525-463b-9d20-5ee133a06b94"}
> --batch_e834eb7c-df0d-4e22-a423-78cd3638955f
> Content-Type: application/http
> Content-Transfer-Encoding: binary
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (TEIID-5599) When creating an entity via POST message, it is expected, that the returned message includes the primary key of the newly created instance. This is not the case currently
by Christoph John (Jira)
[ https://issues.jboss.org/browse/TEIID-5599?page=com.atlassian.jira.plugin... ]
Christoph John edited comment on TEIID-5599 at 1/14/19 3:41 PM:
----------------------------------------------------------------
Hello Steven,
if I do not provide a value for idProfile I get an error. The communication for it looks as follows:
1. request:
POST Account HTTP/1.1
Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true
Accept-Language:de-DE
Content-Type:application/json;charset=UTF-8;IEEE754Compatible=true
{"uuidUser":"65820574-7525-463b-9d20-5ee133a06b94"}
--batch_id-1547497985610-21
Content-Type:application/http
Content-Transfer-Encoding:binary
2. response:
HTTP/1.1 400 Bad Request
Content-Type: application/json;ieee754compatible=true;odata.metadata=minimal
Content-Length: 157
{"error":{"code":"TEIID30089","message":"TEIID30089 Required parameter 'my_nutri_diary.Account.idProfile' has no value was set or is an invalid parameter."}}
--batch_37bbb02c-8f9d-42ea-a56f-bcdef07b8568--
3. The relevant metadata:
<EntityType Name="Account">
<Key>
<PropertyRef Name="idProfile"/>
</Key>
<Property Name="idProfile" Type="Edm.Int64" Nullable="false">
<Annotation Term="teiid.NAMEINSOURCE">
<String>`idProfile`</String>
</Annotation>
<Annotation Term="teiid.UPDATABLE">
<Bool>true</Bool>
</Annotation>
<Annotation Term="teiid.CASE_SENSITIVE">
<Bool>true</Bool>
</Annotation>
</Property>
<Property Name="uuidUser" Type="Edm.String" Nullable="false" MaxLength="36">
<Annotation Term="teiid.NAMEINSOURCE">
<String>`uuidUser`</String>
</Annotation>
<Annotation Term="teiid.UPDATABLE">
<Bool>true</Bool>
</Annotation>
<Annotation Term="teiid.CASE_SENSITIVE">
<Bool>true</Bool>
</Annotation>
</Property>
<NavigationProperty Name="Avatar_fkAvatarToAccount" Type="my_nutri_diary.Avatar" Nullable="false"/>
<NavigationProperty Name="BodyWeight_fkBodyWeightToAccount" Type="Collection(my_nutri_diary.BodyWeight)"/>
<NavigationProperty Name="ConfigOptions_fkConfigOptionsToAccount" Type="my_nutri_diary.ConfigOptions" Nullable="false"/>
<NavigationProperty Name="Profile_fkProfileToAccount" Type="my_nutri_diary.Profile" Nullable="false"/>
<Annotation Term="teiid.NAMEINSOURCE">
<String>`Account`</String>
</Annotation>
<Annotation Term="teiid.UPDATABLE">
<Bool>true</Bool>
</Annotation>
<Annotation Term="my_nutri_diary.teiid_rel:ALLOW_MATVIEW_MANAGEMENT">
<String>false</String>
</Annotation>
<Annotation Term="my_nutri_diary.teiid_rel:MATVIEW_ONERROR_ACTION">
<String>WAIT</String>
</Annotation>
<Annotation Term="my_nutri_diary.teiid_rel:MATVIEW_SHARE_SCOPE">
<String>NONE</String>
</Annotation>
</EntityType>
I am not sure what you mean with Teiid/source metadata, would the vdb export as xml help you here?
Update: I also should mention, that I cannot set a primary key to anything different than not null in the mysql database.
Best regards,
Christoph
was (Author: cjohn001):
Hello Steven,
if I do not provide a value for idProfile I get an error. The communication for it looks as follows:
1. request:
POST Account HTTP/1.1
Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true
Accept-Language:de-DE
Content-Type:application/json;charset=UTF-8;IEEE754Compatible=true
{"uuidUser":"65820574-7525-463b-9d20-5ee133a06b94"}
--batch_id-1547497985610-21
Content-Type:application/http
Content-Transfer-Encoding:binary
2. response:
HTTP/1.1 400 Bad Request
Content-Type: application/json;ieee754compatible=true;odata.metadata=minimal
Content-Length: 157
{"error":{"code":"TEIID30089","message":"TEIID30089 Required parameter 'my_nutri_diary.Account.idProfile' has no value was set or is an invalid parameter."}}
--batch_37bbb02c-8f9d-42ea-a56f-bcdef07b8568--
3. The relevant metadata:
<EntityType Name="Account">
<Key>
<PropertyRef Name="idProfile"/>
</Key>
<Property Name="idProfile" Type="Edm.Int64" Nullable="false">
<Annotation Term="teiid.NAMEINSOURCE">
<String>`idProfile`</String>
</Annotation>
<Annotation Term="teiid.UPDATABLE">
<Bool>true</Bool>
</Annotation>
<Annotation Term="teiid.CASE_SENSITIVE">
<Bool>true</Bool>
</Annotation>
</Property>
<Property Name="uuidUser" Type="Edm.String" Nullable="false" MaxLength="36">
<Annotation Term="teiid.NAMEINSOURCE">
<String>`uuidUser`</String>
</Annotation>
<Annotation Term="teiid.UPDATABLE">
<Bool>true</Bool>
</Annotation>
<Annotation Term="teiid.CASE_SENSITIVE">
<Bool>true</Bool>
</Annotation>
</Property>
<NavigationProperty Name="Avatar_fkAvatarToAccount" Type="my_nutri_diary.Avatar" Nullable="false"/>
<NavigationProperty Name="BodyWeight_fkBodyWeightToAccount" Type="Collection(my_nutri_diary.BodyWeight)"/>
<NavigationProperty Name="ConfigOptions_fkConfigOptionsToAccount" Type="my_nutri_diary.ConfigOptions" Nullable="false"/>
<NavigationProperty Name="Profile_fkProfileToAccount" Type="my_nutri_diary.Profile" Nullable="false"/>
<Annotation Term="teiid.NAMEINSOURCE">
<String>`Account`</String>
</Annotation>
<Annotation Term="teiid.UPDATABLE">
<Bool>true</Bool>
</Annotation>
<Annotation Term="my_nutri_diary.teiid_rel:ALLOW_MATVIEW_MANAGEMENT">
<String>false</String>
</Annotation>
<Annotation Term="my_nutri_diary.teiid_rel:MATVIEW_ONERROR_ACTION">
<String>WAIT</String>
</Annotation>
<Annotation Term="my_nutri_diary.teiid_rel:MATVIEW_SHARE_SCOPE">
<String>NONE</String>
</Annotation>
</EntityType>
I am not sure what you mean with Teiid/source metadata, would the vdb export as xml help you here?
Best regards,
Christoph
> When creating an entity via POST message, it is expected, that the returned message includes the primary key of the newly created instance. This is not the case currently
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-5599
> URL: https://issues.jboss.org/browse/TEIID-5599
> Project: Teiid
> Issue Type: Bug
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Critical
>
> The following communication shows the issue. What I am doing here is to create a new Account entity via post request. My underlaying mysql database requires the primary key in the table to be set to NN (not null), hence, a value must be provided. Moreover the primary key is set to autoincrement and is generated by the database. The only execepted value here seems to be, to provide the key with value=0. The object is created in the database as expected. However, Teiid answers with the created object, but again with the primary key (idProfile) set as zero, instead to provide the newly created primary key.
> POST Account HTTP/1.1
> Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true
> Accept-Language:de-DE
> Content-Type:application/json;charset=UTF-8;IEEE754Compatible=true
> {"uuidUser":"65820574-7525-463b-9d20-5ee133a06b94","idProfile":"0"}
> --batch_id-1547485733072-21
> Content-Type:application/http
> Content-Transfer-Encoding:binary
> The response:
> HTTP/1.1 201 Created
> Location: http://localhost/odata4/svc/my_nutri_diary/Account(0)
> Content-Type: application/json;ieee754compatible=true;odata.metadata=minimal
> Content-Length: 147
> {"@odata.context":"http://localhost/odata4/svc/my_nutri_diary/$metadata#Account","idProfile":"0","uuidUser":"65820574-7525-463b-9d20-5ee133a06b94"}
> --batch_e834eb7c-df0d-4e22-a423-78cd3638955f
> Content-Type: application/http
> Content-Transfer-Encoding: binary
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months
[JBoss JIRA] (TEIID-5599) When creating an entity via POST message, it is expected, that the returned message includes the primary key of the newly created instance. This is not the case currently
by Christoph John (Jira)
[ https://issues.jboss.org/browse/TEIID-5599?page=com.atlassian.jira.plugin... ]
Christoph John commented on TEIID-5599:
---------------------------------------
Hello Steven,
if I do not provide a value for idProfile I get an error. The communication for it looks as follows:
1. request:
POST Account HTTP/1.1
Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true
Accept-Language:de-DE
Content-Type:application/json;charset=UTF-8;IEEE754Compatible=true
{"uuidUser":"65820574-7525-463b-9d20-5ee133a06b94"}
--batch_id-1547497985610-21
Content-Type:application/http
Content-Transfer-Encoding:binary
2. response:
HTTP/1.1 400 Bad Request
Content-Type: application/json;ieee754compatible=true;odata.metadata=minimal
Content-Length: 157
{"error":{"code":"TEIID30089","message":"TEIID30089 Required parameter 'my_nutri_diary.Account.idProfile' has no value was set or is an invalid parameter."}}
--batch_37bbb02c-8f9d-42ea-a56f-bcdef07b8568--
3. The relevant metadata:
<EntityType Name="Account">
<Key>
<PropertyRef Name="idProfile"/>
</Key>
<Property Name="idProfile" Type="Edm.Int64" Nullable="false">
<Annotation Term="teiid.NAMEINSOURCE">
<String>`idProfile`</String>
</Annotation>
<Annotation Term="teiid.UPDATABLE">
<Bool>true</Bool>
</Annotation>
<Annotation Term="teiid.CASE_SENSITIVE">
<Bool>true</Bool>
</Annotation>
</Property>
<Property Name="uuidUser" Type="Edm.String" Nullable="false" MaxLength="36">
<Annotation Term="teiid.NAMEINSOURCE">
<String>`uuidUser`</String>
</Annotation>
<Annotation Term="teiid.UPDATABLE">
<Bool>true</Bool>
</Annotation>
<Annotation Term="teiid.CASE_SENSITIVE">
<Bool>true</Bool>
</Annotation>
</Property>
<NavigationProperty Name="Avatar_fkAvatarToAccount" Type="my_nutri_diary.Avatar" Nullable="false"/>
<NavigationProperty Name="BodyWeight_fkBodyWeightToAccount" Type="Collection(my_nutri_diary.BodyWeight)"/>
<NavigationProperty Name="ConfigOptions_fkConfigOptionsToAccount" Type="my_nutri_diary.ConfigOptions" Nullable="false"/>
<NavigationProperty Name="Profile_fkProfileToAccount" Type="my_nutri_diary.Profile" Nullable="false"/>
<Annotation Term="teiid.NAMEINSOURCE">
<String>`Account`</String>
</Annotation>
<Annotation Term="teiid.UPDATABLE">
<Bool>true</Bool>
</Annotation>
<Annotation Term="my_nutri_diary.teiid_rel:ALLOW_MATVIEW_MANAGEMENT">
<String>false</String>
</Annotation>
<Annotation Term="my_nutri_diary.teiid_rel:MATVIEW_ONERROR_ACTION">
<String>WAIT</String>
</Annotation>
<Annotation Term="my_nutri_diary.teiid_rel:MATVIEW_SHARE_SCOPE">
<String>NONE</String>
</Annotation>
</EntityType>
I am not sure what you mean with Teiid/source metadata, would the vdb export as xml help you here?
Best regards,
Christoph
> When creating an entity via POST message, it is expected, that the returned message includes the primary key of the newly created instance. This is not the case currently
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-5599
> URL: https://issues.jboss.org/browse/TEIID-5599
> Project: Teiid
> Issue Type: Bug
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Critical
>
> The following communication shows the issue. What I am doing here is to create a new Account entity via post request. My underlaying mysql database requires the primary key in the table to be set to NN (not null), hence, a value must be provided. Moreover the primary key is set to autoincrement and is generated by the database. The only execepted value here seems to be, to provide the key with value=0. The object is created in the database as expected. However, Teiid answers with the created object, but again with the primary key (idProfile) set as zero, instead to provide the newly created primary key.
> POST Account HTTP/1.1
> Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true
> Accept-Language:de-DE
> Content-Type:application/json;charset=UTF-8;IEEE754Compatible=true
> {"uuidUser":"65820574-7525-463b-9d20-5ee133a06b94","idProfile":"0"}
> --batch_id-1547485733072-21
> Content-Type:application/http
> Content-Transfer-Encoding:binary
> The response:
> HTTP/1.1 201 Created
> Location: http://localhost/odata4/svc/my_nutri_diary/Account(0)
> Content-Type: application/json;ieee754compatible=true;odata.metadata=minimal
> Content-Length: 147
> {"@odata.context":"http://localhost/odata4/svc/my_nutri_diary/$metadata#Account","idProfile":"0","uuidUser":"65820574-7525-463b-9d20-5ee133a06b94"}
> --batch_e834eb7c-df0d-4e22-a423-78cd3638955f
> Content-Type: application/http
> Content-Transfer-Encoding: binary
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 11 months