vdm generated class without getters - s4sdk

When generating Odata classes with vdm, the entity class does not have getters defined for each field. Example: getBpdid(), getChangeFlag(),etc. are missing.
I am using S4 HANA SDK 2.9.1 and Spring Boot 2.1.3
Here is the configuration of the generator:
<configuration>
<inputDirectory>${project.basedir}/edmx</inputDirectory>
<outputDirectory>${project.build.directory}/vdm</outputDirectory>
<deleteOutputDirectory>true</deleteOutputDirectory>
<packageName>com.sap.scenario.vdm</packageName>
<nameSource>NAME</nameSource>
<includeFunctionImports>
<params>none</params>
</includeFunctionImports>
<includeEntitySets>
<params>ScenarioSet</params>
</includeEntitySets>
</configuration>
And the EDMX definition of the entity type:
</EntityType>
<EntityType Name="Scenario" sap:content-version="1">
<Key>
<PropertyRef Name="Bpdid"/>
</Key>
<Property Name="Bpdid" Type="Edm.String" Nullable="false" MaxLength="40" sap:unicode="false" sap:label="Text, 40 Characters Long" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="ChangeFlag" Type="Edm.String" MaxLength="1" sap:unicode="false" sap:label="Change flag for an automate" sap:creatable="false" sap:updatable="false" sap:sortable="false"/>
<Property Name="BpdUrl" Type="Edm.String" Nullable="false" MaxLength="1024" sap:unicode="false" sap:label="String" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="CountryName" Type="Edm.String" Nullable="false" MaxLength="15" sap:unicode="false" sap:label="CountryName" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="Bpdsid" Type="Edm.String" Nullable="false" MaxLength="255" sap:unicode="false" sap:label="process name" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="UpgradeSel" Type="Edm.Boolean" Nullable="false" sap:unicode="false" sap:label="Indicator" sap:creatable="false" sap:updatable="false" sap:sortable="false"/>
<Property Name="Bpdtype" Type="Edm.String" MaxLength="50" sap:unicode="false" sap:label="Explanation" sap:creatable="false" sap:updatable="false" sap:sortable="false"/>
<Property Name="Country" Type="Edm.String" MaxLength="50" sap:unicode="false" sap:label="c" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="Status" Type="Edm.String" MaxLength="1" sap:unicode="false" sap:label="Char01" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="App" Type="Edm.String" MaxLength="20" sap:unicode="false" sap:label="Description" sap:updatable="false" sap:sortable="false"/>
<Property Name="Bpdname" Type="Edm.String" Nullable="false" MaxLength="255" sap:unicode="false" sap:label="Text" sap:updatable="false" sap:sortable="false"/>
<Property Name="Changed" Type="Edm.String" MaxLength="1" sap:unicode="false" sap:label="Indicator" sap:updatable="false" sap:sortable="false" sap:filterable="false"/>
<Property Name="Uname" Type="Edm.String" MaxLength="80" sap:unicode="false" sap:label="User name" sap:creatable="false" sap:updatable="false" sap:filterable="false"/>
<Property Name="Createstamp" Type="Edm.DateTime" Precision="0" sap:unicode="false" sap:label="Time Stamp" sap:creatable="false" sap:updatable="false" sap:filterable="false"/>
<Property Name="LockName" Type="Edm.String" MaxLength="80" sap:unicode="false" sap:label="User name" sap:creatable="false" sap:updatable="false"/>
<Property Name="ChangeTime" Type="Edm.DateTime" Precision="0" sap:unicode="false" sap:label="Time Stamp" sap:creatable="false" sap:updatable="false"/>
<Property Name="rel" Type="Edm.String" MaxLength="10" sap:unicode="false" sap:label="SAP Release" sap:creatable="false" sap:updatable="false"/>
<NavigationProperty Name="options" Relationship="e2eie_ic_mngcldsol.options" FromRole="FromRole_options" ToRole="ToRole_options"/>
<NavigationProperty Name="ProcedureSet" Relationship="e2eie_ic_mngcldsol.Scenario_Procedure" FromRole="FromRole_Scenario_Procedure" ToRole="ToRole_Scenario_Procedure"/>
</EntityType>

To be able to use Lombok in Spring Test Tool I needed to install the library. Same problem described here: Lombok not working with STS

Related

Connection has already been closed.; nested exception is java.sql.SQLException: Connection has already been closed

Tomcat 8
<bean id="dataSource" class="org.apache.tomcat.jdbc.pool.DataSource"
destroy-method="close">
<property name="driverClassName" value="com.mysql.cj.jdbc.Driver" />
<property name="url" value="${database.url}" />
<property name="username" value="${database.username}" />
<property name="password" value="${database.password}" />
<property name="initialSize" value="10" />
<property name="maxActive" value="200" />
<property name="minIdle" value="10" />
<property name="maxIdle" value="50" />
<property name="maxWait" value="50000" />
<property name="fairQueue" value="true" />
<property name="logAbandoned" value="true" />
<property name="removeAbandoned" value="true" />
<property name="testOnBorrow" value="true" />
<property name="timeBetweenEvictionRunsMillis" value="60000" />
<property name="validationQuery" value="${database.validationQuery}" />
</bean>
App is running on tomcat 8 and starts giving the error after 15 20 mins
SQL state [null]; error code [0]; Connection has already been closed.; nested exception is java.sql.SQLException: Connection has already been closed.
at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1542)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:667)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:713)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:738)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:794)
at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:209)
at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.queryForList(NamedParameterJdbcTemplate.java:303)
at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.queryForList(NamedParameterJdbcTemplate.java:310)
Increase the value of removeAbandonedTimeOut in tomcat-resources.xml so that it is set to the longest running query the application may have.
removed this <property name="removeAbandoned" value="true" /> after change app is working fine

How to get the details about the contact/account fields along with their types using Web API in Dynamics 365?

I am fairly new to Dynamics 365 and currently trying to get the details about the contact fields (the name of the field and the field type - String, Boolean, Int32 etc. mainly) - in other words, the properties that are listed over here: https://learn.microsoft.com/en-us/dynamics365/customer-engagement/web-api/contact?view=dynamics-ce-odata-9 - through the web API but I am unable to find any relevant documentation.
The only place where I can find these details is from the metadata endpoint - api/data/v9.0/$metadata#contacts -
<EntityType Name="account" BaseType="mscrm.crmbaseentity">
<Key>
<PropertyRef Name="accountid"/>
</Key>
<Property Name="territorycode" Type="Edm.Int32"/>
<Property Name="lastusedincampaign" Type="Edm.DateTimeOffset"/>
<Property Name="_msdyn_preferredresource_value" Type="Edm.Guid"/>
<Property Name="address1_name" Type="Edm.String" Unicode="false"/>
<Property Name="timezoneruleversionnumber" Type="Edm.Int32"/>
<Property Name="_owningbusinessunit_value" Type="Edm.Guid"/>
<Property Name="overriddencreatedon" Type="Edm.DateTimeOffset"/>
<Property Name="address1_telephone3" Type="Edm.String" Unicode="false"/>
<Property Name="entityimageid" Type="Edm.Guid"/>
<Property Name="ownershipcode" Type="Edm.Int32"/>
<Property Name="customersizecode" Type="Edm.Int32"/>
<Property Name="_primarycontactid_value" Type="Edm.Guid"/>
<Property Name="creditlimit" Type="Edm.Decimal" Scale="Variable"/>
<Property Name="entityimage_url" Type="Edm.String" Unicode="false"/>
<Property Name="versionnumber" Type="Edm.Int64"/>
<Property Name="_territoryid_value" Type="Edm.Guid"/>
<Property Name="entityimage_timestamp" Type="Edm.Int64"/>
<Property Name="telephone3" Type="Edm.String" Unicode="false"/>
<Property Name="donotbulkpostalmail" Type="Edm.Boolean"/>
<Property Name="address1_freighttermscode" Type="Edm.Int32"/>
<Property Name="address1_postofficebox" Type="Edm.String" Unicode="false"/>
<Property Name="address1_fax" Type="Edm.String" Unicode="false"/>
<Property Name="onholdtime" Type="Edm.Int32"/>
<Property Name="_defaultpricelevelid_value" Type="Edm.Guid"/>
<Property Name="telephone2" Type="Edm.String" Unicode="false"/>
<Property Name="opendeals" Type="Edm.Int32"/>
<Property Name="shippingmethodcode" Type="Edm.Int32"/>
<Property Name="address1_addressid" Type="Edm.Guid"/>
<Property Name="new_fdaccount" Type="Edm.String" Unicode="false"/>
<Property Name="address1_composite" Type="Edm.String" Unicode="false"/>
<Property Name="_createdonbehalfby_value" Type="Edm.Guid"/>
<Property Name="address2_city" Type="Edm.String" Unicode="false"/>
<Property Name="address2_latitude" Type="Edm.Double"/>
<Property Name="entityimage" Type="Edm.Binary"/>
<Property Name="opendeals_state" Type="Edm.Int32"/>
<Property Name="address1_telephone2" Type="Edm.String" Unicode="false"/>
<Property Name="aging90_base" Type="Edm.Decimal" Scale="Variable"/>
<Property Name="address2_postalcode" Type="Edm.String" Unicode="false"/>
<Property Name="address2_name" Type="Edm.String" Unicode="false"/>
<Property Name="primarysatoriid" Type="Edm.String" Unicode="false"/>
<Property Name="_owningteam_value" Type="Edm.Guid"/>
<Property Name="_masterid_value" Type="Edm.Guid"/>
<Property Name="accountnumber" Type="Edm.String" Unicode="false"/>
<Property Name="aging30" Type="Edm.Decimal" Scale="Variable"/>
<Property Name="msdyn_travelchargetype" Type="Edm.Int32"/>
<Property Name="address2_county" Type="Edm.String" Unicode="false"/>
<Property Name="donotbulkemail" Type="Edm.Boolean"/>
<Property Name="_originatingleadid_value" Type="Edm.Guid"/>
<Property Name="emailaddress3" Type="Edm.String" Unicode="false"/>
<Property Name="_modifiedbyexternalparty_value" Type="Edm.Guid"/>
<Property Name="paymenttermscode" Type="Edm.Int32"/>
<Property Name="websiteurl" Type="Edm.String" Unicode="false"/>
<Property Name="revenue" Type="Edm.Decimal" Scale="Variable"/>
<Property Name="merged" Type="Edm.Boolean"/>
<Property Name="address1_shippingmethodcode" Type="Edm.Int32"/>
<Property Name="description" Type="Edm.String" Unicode="false"/>
<Property Name="address2_line1" Type="Edm.String" Unicode="false"/>
<Property Name="aging30_base" Type="Edm.Decimal" Scale="Variable"/>
<Property Name="address1_stateorprovince" Type="Edm.String" Unicode="false"/>
<Property Name="lastonholdtime" Type="Edm.DateTimeOffset"/>
<Property Name="sharesoutstanding" Type="Edm.Int32"/>
<Property Name="sic" Type="Edm.String" Unicode="false"/>
<Property Name="marketcap" Type="Edm.Decimal" Scale="Variable"/>
<Property Name="_owninguser_value" Type="Edm.Guid"/>
<Property Name="_msdyn_workhourtemplate_value" Type="Edm.Guid"/>
<Property Name="_ownerid_value" Type="Edm.Guid"/>
<Property Name="address2_addressid" Type="Edm.Guid"/>
<Property Name="address2_telephone1" Type="Edm.String" Unicode="false"/>
<Property Name="msdyn_travelcharge" Type="Edm.Decimal" Scale="Variable"/>
<Property Name="address1_primarycontactname" Type="Edm.String" Unicode="false"/>
<Property Name="openrevenue" Type="Edm.Decimal" Scale="Variable"/>
<Property Name="statecode" Type="Edm.Int32"/>
<Property Name="address1_latitude" Type="Edm.Double"/>
<Property Name="_msdyn_salestaxcode_value" Type="Edm.Guid"/>
<Property Name="donotfax" Type="Edm.Boolean"/>
<Property Name="msdyn_workorderinstructions" Type="Edm.String" Unicode="false"/>
<Property Name="address1_county" Type="Edm.String" Unicode="false"/>
<Property Name="address2_telephone3" Type="Edm.String" Unicode="false"/>
<Property Name="_transactioncurrencyid_value" Type="Edm.Guid"/>
<Property Name="_preferredserviceid_value" Type="Edm.Guid"/>
<Property Name="accountratingcode" Type="Edm.Int32"/>
<Property Name="msdyn_travelcharge_base" Type="Edm.Decimal" Scale="Variable"/>
<Property Name="stageid" Type="Edm.Guid"/>
<Property Name="address2_composite" Type="Edm.String" Unicode="false"/>
<Property Name="utcconversiontimezonecode" Type="Edm.Int32"/>
<Property Name="donotemail" Type="Edm.Boolean"/>
<Property Name="aging60" Type="Edm.Decimal" Scale="Variable"/>
<Property Name="customertypecode" Type="Edm.Int32"/>
<Property Name="telephone1" Type="Edm.String" Unicode="false"/>
<Property Name="_createdby_value" Type="Edm.Guid"/>
<Property Name="address2_longitude" Type="Edm.Double"/>
<Property Name="marketingonly" Type="Edm.Boolean"/>
<Property Name="_modifiedby_value" Type="Edm.Guid"/>
<Property Name="yominame" Type="Edm.String" Unicode="false"/>
<Property Name="address2_primarycontactname" Type="Edm.String" Unicode="false"/>
<Property Name="openrevenue_date" Type="Edm.DateTimeOffset"/>
<Property Name="address2_country" Type="Edm.String" Unicode="false"/>
<Property Name="address1_line2" Type="Edm.String" Unicode="false"/>
<Property Name="donotsendmm" Type="Edm.Boolean"/>
<Property Name="address1_postalcode" Type="Edm.String" Unicode="false"/>
<Property Name="traversedpath" Type="Edm.String" Unicode="false"/>
<Property Name="numberofemployees" Type="Edm.Int32"/>
<Property Name="tickersymbol" Type="Edm.String" Unicode="false"/>
<Property Name="address1_city" Type="Edm.String" Unicode="false"/>
<Property Name="aging90" Type="Edm.Decimal" Scale="Variable"/>
<Property Name="address1_longitude" Type="Edm.Double"/>
<Property Name="participatesinworkflow" Type="Edm.Boolean"/>
<Property Name="revenue_base" Type="Edm.Decimal" Scale="Variable"/>
<Property Name="creditonhold" Type="Edm.Boolean"/>
<Property Name="address1_telephone1" Type="Edm.String" Unicode="false"/>
<Property Name="createdon" Type="Edm.DateTimeOffset"/>
<Property Name="name" Type="Edm.String" Unicode="false"/>
<Property Name="exchangerate" Type="Edm.Decimal" Scale="Variable"/>
<Property Name="address2_addresstypecode" Type="Edm.Int32"/>
<Property Name="address2_line2" Type="Edm.String" Unicode="false"/>
<Property Name="address1_upszone" Type="Edm.String" Unicode="false"/>
<Property Name="msdyn_externalaccountid" Type="Edm.String" Unicode="false"/>
<Property Name="primarytwitterid" Type="Edm.String" Unicode="false"/>
<Property Name="timespentbymeonemailandmeetings" Type="Edm.String" Unicode="false"/>
<Property Name="openrevenue_state" Type="Edm.Int32"/>
<Property Name="address1_line1" Type="Edm.String" Unicode="false"/>
<Property Name="accountid" Type="Edm.Guid"/>
<Property Name="_slaid_value" Type="Edm.Guid"/>
<Property Name="ftpsiteurl" Type="Edm.String" Unicode="false"/>
<Property Name="followemail" Type="Edm.Boolean"/>
<Property Name="address2_freighttermscode" Type="Edm.Int32"/>
<Property Name="donotphone" Type="Edm.Boolean"/>
<Property Name="accountclassificationcode" Type="Edm.Int32"/>
<Property Name="donotpostalmail" Type="Edm.Boolean"/>
<Property Name="_preferredequipmentid_value" Type="Edm.Guid"/>
<Property Name="teamsfollowed" Type="Edm.Int32"/>
<Property Name="processid" Type="Edm.Guid"/>
<Property Name="address2_telephone2" Type="Edm.String" Unicode="false"/>
<Property Name="address1_addresstypecode" Type="Edm.Int32"/>
<Property Name="address1_utcoffset" Type="Edm.Int32"/>
<Property Name="_parentaccountid_value" Type="Edm.Guid"/>
<Property Name="_msdyn_serviceterritory_value" Type="Edm.Guid"/>
<Property Name="_createdbyexternalparty_value" Type="Edm.Guid"/>
<Property Name="address2_fax" Type="Edm.String" Unicode="false"/>
<Property Name="businesstypecode" Type="Edm.Int32"/>
<Property Name="aging60_base" Type="Edm.Decimal" Scale="Variable"/>
<Property Name="_modifiedonbehalfby_value" Type="Edm.Guid"/>
<Property Name="address2_shippingmethodcode" Type="Edm.Int32"/>
<Property Name="stockexchange" Type="Edm.String" Unicode="false"/>
<Property Name="msdyn_taxexemptnumber" Type="Edm.String" Unicode="false"/>
<Property Name="preferredappointmentdaycode" Type="Edm.Int32"/>
<Property Name="creditlimit_base" Type="Edm.Decimal" Scale="Variable"/>
<Property Name="address1_line3" Type="Edm.String" Unicode="false"/>
<Property Name="_msdyn_billingaccount_value" Type="Edm.Guid"/>
<Property Name="preferredcontactmethodcode" Type="Edm.Int32"/>
<Property Name="fax" Type="Edm.String" Unicode="false"/>
<Property Name="openrevenue_base" Type="Edm.Decimal" Scale="Variable"/>
<Property Name="statuscode" Type="Edm.Int32"/>
<Property Name="address2_upszone" Type="Edm.String" Unicode="false"/>
<Property Name="_slainvokedid_value" Type="Edm.Guid"/>
<Property Name="opendeals_date" Type="Edm.DateTimeOffset"/>
<Property Name="address1_country" Type="Edm.String" Unicode="false"/>
<Property Name="modifiedon" Type="Edm.DateTimeOffset"/>
<Property Name="address2_line3" Type="Edm.String" Unicode="false"/>
<Property Name="address2_postofficebox" Type="Edm.String" Unicode="false"/>
<Property Name="address2_utcoffset" Type="Edm.Int32"/>
<Property Name="msdyn_taxexempt" Type="Edm.Boolean"/>
<Property Name="emailaddress1" Type="Edm.String" Unicode="false"/>
<Property Name="_preferredsystemuserid_value" Type="Edm.Guid"/>
<Property Name="address2_stateorprovince" Type="Edm.String" Unicode="false"/>
<Property Name="preferredappointmenttimecode" Type="Edm.Int32"/>
<Property Name="emailaddress2" Type="Edm.String" Unicode="false"/>
<Property Name="marketcap_base" Type="Edm.Decimal" Scale="Variable"/>
<Property Name="importsequencenumber" Type="Edm.Int32"/>
<Property Name="industrycode" Type="Edm.Int32"/>
<Property Name="accountcategorycode" Type="Edm.Int32"/>
but this returns the whole metadata as XML which contain a lot of unnecessary information. Is there any way I can retrieve this information as JSON?
Normally we will use XrmToolBox Metadata browser to explore the entity/attribute metadata. You can find some browser addin too.
If you want to download the schema metadata, you can go to Settings - Customizations - Developer resources and download the huge xml file.
When you need the Json metadata in code use the below web api endpoint:
clientURL + "api/data/v9.0/EntityDefinitions(LogicalName='contact')/Attributes"
Read more
may be this is helpful for you Converting XMLto JSON :-
http://goessner.net/download/prj/jsonxml/
also you can add this https://github.com/abdmob/x2js
This library provides XML to JSON (JavaScript Objects) and vice versa javascript conversion functions.The library is very small and doesn't require any other additional libraries.
Demo on http://jsfiddle.net/abdmob/gkxucxrj/1/

oData: $expand, $filter and $count a 1-N Relation

I have two OData Services (m:DataServiceVersion="2.0"):
AACUSTOMERS10M: Serving Customers,
AATRANSACTIONS10M: Serving Customers Transactions
Between them a 1..* relation is defined in <NavigationProperty>.
How can I $count all Customers with a given FIRSTNAME and at least one transaction with a given TRANSACTION_NAME?
So far I tried (as one line):
http://.../AACUSTOMERS10M?
$count
&$expand=TRANSACTIONS
&$filter=FIRSTNAME%20%27Maria%27%20
and%20TRANSACTIONS/TRANSACTION_NAME%20%27New%27
But I get the error
"Illegal query syntax. Segment before '/' is not an entity or complex type."
/$metadata:
<EntityType Name="AACUSTOMERS10MType">
<Key>
<PropertyRef Name="ID"/>
</Key>
<Property Name="ID" Type="Edm.Int32" Nullable="false"/>
<Property Name="FIRSTNAME" Type="Edm.String" DefaultValue="" MaxLength="100"/>
<Property Name="LASTNAME" Type="Edm.String" DefaultValue="" MaxLength="100"/>
<Property Name="STREET" Type="Edm.String" DefaultValue="" MaxLength="100"/>
<Property Name="ZIP" Type="Edm.String" DefaultValue="" MaxLength="100"/>
<Property Name="CITY" Type="Edm.String" DefaultValue="" MaxLength="100"/>
<Property Name="GENDERNAME" Type="Edm.String" DefaultValue="" MaxLength="100"/>
<Property Name="AGE" Type="Edm.Byte"/>
<Property Name="PROFESSIONNAME" Type="Edm.String" DefaultValue="" MaxLength="100"/>
<Property Name="MARITALSTATUSNAME" Type="Edm.String" DefaultValue="" MaxLength="100"/>
<Property Name="INCOMENAME" Type="Edm.String" DefaultValue="" MaxLength="100"/>
<NavigationProperty Name="TRANSACTIONS" Relationship="myTestPack.oData.artificial.CUSTOMER_TRANSACTIONSType" FromRole="AACUSTOMERS10MPrincipal" ToRole="AATRANSACTIONS10MDependent"/>
</EntityType>
<EntityType Name="AATRANSACTIONS10MType">
<Key>
<PropertyRef Name="ID"/>
<PropertyRef Name="CONTRACTNUMBER"/>
<PropertyRef Name="TRANSACTIONDATE"/>
</Key>
<Property Name="ID" Type="Edm.Int32" Nullable="false"/>
<Property Name="CONTRACTNUMBER" Type="Edm.Int32" Nullable="false"/>
<Property Name="GESCHAEFTSFELD" Type="Edm.String" MaxLength="100"/>
<Property Name="BEREICH" Type="Edm.String" MaxLength="100"/>
<Property Name="AGENT_NAME" Type="Edm.String" MaxLength="201"/>
<Property Name="TRANSACTIONDATE" Type="Edm.DateTime" Nullable="false"/>
<Property Name="TRANSACTION_NAME" Type="Edm.String" MaxLength="100"/>
<Property Name="ENDDATE" Type="Edm.DateTime"/>
<Property Name="DEPOSITVALUE" Type="Edm.Double"/>
<Property Name="MONTHLYFEE" Type="Edm.Double"/>
<Property Name="DELTA" Type="Edm.Double"/>
<NavigationProperty Name="TRANSACTIONS" Relationship="myTestPack.oData.artificial.CUSTOMER_TRANSACTIONSType" FromRole="AATRANSACTIONS10MDependent" ToRole="AACUSTOMERS10MPrincipal"/>
</EntityType>
<Association Name="CUSTOMER_TRANSACTIONSType">
<End Type="myTestPack.oData.artificial.AACUSTOMERS10MType" Role="AACUSTOMERS10MPrincipal" Multiplicity="1"/>
<End Type="myTestPack.oData.artificial.AATRANSACTIONS10MType" Role="AATRANSACTIONS10MDependent" Multiplicity="*"/>
</Association>
You may try this, it should work in OData V4
/AACUSTOMERS10M?$count&$filter=FIRSTNAME eq 'Maria'&$expand=TRANSACTIONS($filter=TRANSACTION_NAME eq 'New')

MaxOpenPreparedStatements limit reached

While starting the application once the scheduler starts running , I get the following error
Caused by: java.sql.SQLException: MaxOpenPreparedStatements limit reached
Below is the properties
<entry key="jdbc.preparedStatementCacheSize" value="500" />
<entry key="jdbc.initialSize" value="5" />
<entry key="jdbc.maxActive" value="100" />
<entry key="jdbc.maxIdle" value="${jdbc.initialSize}" />
<entry key="jdbc.minIdle" value="0" />
<entry key="jdbc.validationQuery" value="select database()" />
<entry key="jdbc.maxWait" value="16000"/>
The bean datasource
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="${jdbc.driverClassName}"/>
<property name="url" value="${jdbc.url}"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
<property name="poolPreparedStatements" value="true" />
<property name="maxOpenPreparedStatements" alue="${jdbc.preparedStatementCacheSize}"/>
<property name="initialSize" value="${jdbc.initialSize}" />
<property name="maxActive" value="${jdbc.maxActive}" />
<property name="maxIdle" value="${jdbc.maxIdle}" />
<property name="minIdle" value="${jdbc.minIdle}" />
<property name="validationQuery" value="${jdbc.validationQuery}" />
</bean>
Instead of org.apache.commons.dbcp.BasicDataSource if I use
org.springframework.jdbc.datasource.DriverManagerDataSource then I wont get this exception.
I am using Spring 2.5. Please help me in resolving this exception.

EF 5 with oracle edmx StoreGeneratedPattern="Identity" issue

We are using EF5 with Oracle[Oracle.manageddataaccess.client].Whenever I create/refresh edmx.I loose the property StoreGeneratedPattern="Identity". I had to set this manually for each and every Entity.
Is there any way to automate it or any other work around ? am I missing something here ?
We use VS2013,Below is the sample entity in the edmx after create.
<EntityType Name="ADDRESS">
<Key>
<PropertyRef Name="ADDRESS_ID" />
</Key>
<Property Name="ADDRESS_ID" Type="number" Precision="38" Scale="0" Nullable="false" />
<Property Name="CLIENT_ID" Type="number" Precision="38" Scale="0" Nullable="false" />
<Property Name="USER_ID" Type="number" Precision="38" Scale="0" />
<Property Name="ADDRESS_ACT_FLG" Type="number" Precision="38" Scale="0" />
<Property Name="ADDRESS_1" Type="varchar2" MaxLength="50" />
<Property Name="ADDRESS_2" Type="varchar2" MaxLength="50" />
<Property Name="ADDRESS_3" Type="varchar2" MaxLength="50" />
<Property Name="ADDRESS_4" Type="varchar2" MaxLength="50" />
<Property Name="ADDRESS_SUFFIX" Type="char" MaxLength="2" />
<Property Name="COUNTY" Type="varchar2" MaxLength="50" />
<Property Name="CITY" Type="varchar2" MaxLength="50" />
<Property Name="STATE_PROVINCE" Type="varchar2" MaxLength="75" />
<Property Name="COUNTRY" Type="varchar2" MaxLength="50" />
<Property Name="POSTAL_CODE" Type="varchar2" MaxLength="10" />
<Property Name="ADDRESS_TYPE" Type="varchar2" MaxLength="2" />
<Property Name="PRIMARY_ADDRESS_IND" Type="number" Precision="38" Scale="0" />
<Property Name="CREATED_USER_ID" Type="number" Precision="38" Scale="0" Nullable="false" />
<Property Name="CREATED_DATE" Type="timestamp" Precision="6" Nullable="false" />
<Property Name="MODIFIED_USER_ID" Type="number" Precision="38" Scale="0" Nullable="false" />
<Property Name="MODIFIED_DATE" Type="timestamp" Precision="6" Nullable="false" />
</EntityType>
I have written a short blog post about it: http://blog.aitgmbh.de/2014/06/02/patch-for-entity-framework-models-based-on-oracle-databases/
There I also refer to a NuGet package that I have created: http://bit.ly/1hbxIsO
This adds MSBuild scripts that manipulate the edmx file automatically.
It basically lets you define which columns should be identity columns and ensures at every build that the StoreGeneratedPattern property of these identity columns is set to "Identity".
Update: The patch is now also available on GitHub.

Resources