[ 
https://issues.apache.org/jira/browse/OLINGO-996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tobias Stolzenberger updated OLINGO-996:
----------------------------------------
    Description: 
Hi,

I'm using the Olingo JPA extension. The persistence unit I'm using has a name 
containing dots: 

like this:
{code:borderStyle=solid}
<persistence-unit name="com.mycompany.name" transaction-type="RESOURCE_LOCAL">
{code}

Per default the JPA extension uses the name of the persistence as name of the 
entity container.

The problem is that per OData spec the entity container name must names 
containing dots:
 
https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MC-CSDL/[MC-CSDL].pdf
 
Page 31: "EntityContainer MUST have a Name attribute defined that is of type 
SimpleIdentifier".

I found a workaround to overwrite the entity container name in code. However I 
think it makes sense that the default algorithm to automatically create this 
name should produce only valid names.

Regards,
Tobias




  was:
Hi,

I'm using the Olingo JPA extension. The persistence unit I'm using has a name 
containing dots: 

like this:
{code:borderStyle=solid}
<persistence-unit name="com.mycompany.name" transaction-type="RESOURCE_LOCAL">
{code}

Per default the JPA extension uses the name of the persistence as name of the 
entity container.

The problem is that per OData spec the entity container name must names 
containing dots:
 
https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MC-CSDL/[MC-CSDL].pdf
 
Page 31: "EntityContainer MUST have a Name attribute defined that is of type 
SimpleIdentifier".
 
Page 70/71:
2.2.6 SimpleIdentifier
SimpleIdentifier is a string-based representation. The maximum length of the 
identifier MUST be less than 480.
The following pattern represents the allowed identifiers in the ECMA 
specification, [ECMA-334]:
{code:borderStyle=solid}
value="[\p{L}\p{Nl}][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}\p{Cf}]{0,}".
{code:borderStyle=solid}

I found a workaround to overwrite the entity container name in code. However I 
think it makes sense that the default algorithm to automatically create this 
name should produce only valid names.

Regards,
Tobias





> ODataJPA Extension creates illegal Entity Container Name
> --------------------------------------------------------
>
>                 Key: OLINGO-996
>                 URL: https://issues.apache.org/jira/browse/OLINGO-996
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-jpa
>            Reporter: Tobias Stolzenberger
>            Priority: Minor
>
> Hi,
> I'm using the Olingo JPA extension. The persistence unit I'm using has a name 
> containing dots: 
> like this:
> {code:borderStyle=solid}
> <persistence-unit name="com.mycompany.name" transaction-type="RESOURCE_LOCAL">
> {code}
> Per default the JPA extension uses the name of the persistence as name of the 
> entity container.
> The problem is that per OData spec the entity container name must names 
> containing dots:
>  
> https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MC-CSDL/[MC-CSDL].pdf
>  
> Page 31: "EntityContainer MUST have a Name attribute defined that is of type 
> SimpleIdentifier".
> I found a workaround to overwrite the entity container name in code. However 
> I think it makes sense that the default algorithm to automatically create 
> this name should produce only valid names.
> Regards,
> Tobias



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to