[ https://issues.apache.org/jira/browse/OLINGO-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mahdi Ansari updated OLINGO-1461: --------------------------------- Description: In MySQL the column that are boolean are modeled via {{bit(1)}} or {{byte(1)}}. When I am using Olingo/Jpa beside MySQL and generate the entities in the Eclipse, it will assign type {{byte}} to these columns. It means in the metadata we will have something like this: {code:java} <Property Name="Deleted" Type="Edm.Byte" Nullable="false"/>{code} How can I modify the EDM type like the following? {code:java} <Property Name="Deleted" Type="Edm.Boolean" Nullable="false"/>{code} What I want to do is to do this modification with a mapping file, something like what explained [here|https://olingo.apache.org/doc/odata2/tutorials/jparedefinemetadata.html]. _(By this tutorial we can only change the names and not the types!)_ Please note that I make {{eclipselink-orm.xml}} also automatically. I don't want to modify this file but it seems the type can be changed there as it has a line like this: {code:java} <basic name="deleted" attribute-type="byte">{code} However I don't want to modify this file each time while I generate it via Eclipse. Is there anyway that I extend some attributes there and inherent the rests? was: In MySQL the column that are boolean are modeled via {{bit(1)}} or {{byte(1)}}. When I am using Olingo/Jpa beside MySQL and generate the entities in the Eclipse, it will assign type {{byte}} to these columns. It means in the metadata we will have something like this: {{}} {code:java} <Property Name="Deleted" Type="Edm.Byte" Nullable="false"/>{code} How can I modify the EDM type like the following? {{}} {code:java} <Property Name="Deleted" Type="Edm.Boolean" Nullable="false"/>{code} What I want to do is to do this modification with a mapping file, something like what explained [here|https://olingo.apache.org/doc/odata2/tutorials/jparedefinemetadata.html]. _(By this tutorial we can only change the names and not the types!)_ Please note that I make {{eclipselink-orm.xml}} also automatically. I don't want to modify this file but it seems the type can be changed there as it has a line like this: {{}} {code:java} <basic name="deleted" attribute-type="byte">{code} However I don't want to modify this file each time while I generate it via Eclipse. Is there anyway that I extend some attributes there and inherent the rests? > How can I modify Edm types in olingo by mapping in Olingo > --------------------------------------------------------- > > Key: OLINGO-1461 > URL: https://issues.apache.org/jira/browse/OLINGO-1461 > Project: Olingo > Issue Type: Question > Components: odata2-jpa > Affects Versions: V2 2.0.11 > Reporter: Mahdi Ansari > Priority: Major > > In MySQL the column that are boolean are modeled via {{bit(1)}} or > {{byte(1)}}. > When I am using Olingo/Jpa beside MySQL and generate the entities in the > Eclipse, it will assign type {{byte}} to these columns. It means in the > metadata we will have something like this: > {code:java} > <Property Name="Deleted" Type="Edm.Byte" Nullable="false"/>{code} > How can I modify the EDM type like the following? > {code:java} > <Property Name="Deleted" Type="Edm.Boolean" Nullable="false"/>{code} > What I want to do is to do this modification with a mapping file, something > like what explained > [here|https://olingo.apache.org/doc/odata2/tutorials/jparedefinemetadata.html]. > _(By this tutorial we can only change the names and not the types!)_ > Please note that I make {{eclipselink-orm.xml}} also automatically. I don't > want to modify this file but it seems the type can be changed there as it has > a line like this: > > {code:java} > <basic name="deleted" attribute-type="byte">{code} > However I don't want to modify this file each time while I generate it via > Eclipse. Is there anyway that I extend some attributes there and inherent the > rests? -- This message was sent by Atlassian Jira (v8.3.4#803005)