ruby_odata 0.1.6 → 0.2.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +2 -0
- data/Guardfile +1 -1
- data/features/basic_auth.feature +13 -13
- data/features/cassettes/basic_auth_protected_resource.yml +22 -20
- data/features/cassettes/batch_request_additions.yml +26 -26
- data/features/cassettes/batch_request_deletes.yml +27 -27
- data/features/cassettes/batch_request_updates.yml +26 -26
- data/features/cassettes/clean_database_for_testing.yml +10 -10
- data/features/cassettes/cucumber_tags/basic_auth.yml +54 -163
- data/features/cassettes/cucumber_tags/batch_request.yml +229 -1118
- data/features/cassettes/cucumber_tags/complex_types.yml +81 -191
- data/features/cassettes/cucumber_tags/error_handling.yml +45 -33
- data/features/cassettes/cucumber_tags/query_builder.yml +555 -1248
- data/features/cassettes/cucumber_tags/service_manage.yml +216 -591
- data/features/cassettes/cucumber_tags/service_methods.yml +137 -412
- data/features/cassettes/cucumber_tags/ssl.yml +121 -117
- data/features/cassettes/cucumber_tags/type_conversion.yml +104 -170
- data/features/cassettes/service_manage_additions.yml +26 -28
- data/features/cassettes/service_manage_deletions.yml +21 -21
- data/features/cassettes/service_manage_deletions_2.yml +21 -21
- data/features/cassettes/unsecured_metadata.yml +14 -14
- data/features/service.feature +37 -37
- data/features/service_methods.feature +38 -38
- data/features/step_definitions/pickle_steps.rb +5 -5
- data/features/step_definitions/service_steps.rb +26 -26
- data/features/support/hooks.rb +3 -2
- data/features/support/vcr.rb +13 -13
- data/lib/ruby_odata.rb +4 -1
- data/lib/ruby_odata/association.rb +15 -8
- data/lib/ruby_odata/class_builder.rb +5 -1
- data/lib/ruby_odata/query_builder.rb +171 -173
- data/lib/ruby_odata/resource.rb +153 -0
- data/lib/ruby_odata/service.rb +30 -30
- data/lib/ruby_odata/version.rb +1 -1
- data/ruby_odata.gemspec +48 -43
- data/spec/association_spec.rb +15 -11
- data/spec/fixtures/decimal/metadata.xml +1 -0
- data/spec/fixtures/v4/edmx_metadata.xml +145 -0
- data/spec/fixtures/v4/result_categories.xml +0 -0
- data/spec/revised_service_spec.rb +16 -11
- data/spec/service_spec.rb +149 -114
- data/spec/service_v4_spec.rb +102 -0
- data/spec/spec_helper.rb +6 -1
- metadata +109 -32
- data/features/cassettes/cucumber_tags/service.yml +0 -234
@@ -0,0 +1 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?><edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx"><edmx:DataServices m:DataServiceVersion="1.0" m:MaxDataServiceVersion="3.0" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><Schema Namespace="DokladModel" xmlns="http://schemas.microsoft.com/ado/2009/11/edm"><EntityType Name="Agenda"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="ContactId" Type="Edm.Int32" /><Property Name="CurrencyId" Type="Edm.Int32" Nullable="false" /><Property Name="ConstantSymbolId" Type="Edm.Int32" /><Property Name="PaymentOptionId" Type="Edm.Int32" /><Property Name="Name" Type="Edm.String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" /><Property Name="ActivationCode" Type="Edm.String" Nullable="false" MaxLength="30" FixedLength="false" Unicode="true" /><Property Name="IsVerified" Type="Edm.Boolean" Nullable="false" /><Property Name="DateCreated" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="DatePaidUntil" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="IsRegisteredForVat" Type="Edm.Boolean" Nullable="false" /><Property Name="PrefferedPrice" Type="Edm.Byte" Nullable="false" /><Property Name="PrefferedVatRate" Type="Edm.Byte" Nullable="false" /><Property Name="RoundingDifference" Type="Edm.Byte" Nullable="false" /><Property Name="DefaultInvoiceMaturity" Type="Edm.Int16" Nullable="false" /><Property Name="ItemsTextPrefix" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="ItemsTextSuffix" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="RegisterRecord" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="DateLastLogin" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="LastIpAddress" Type="Edm.String" Nullable="false" MaxLength="40" FixedLength="false" Unicode="false" /><Property Name="IsCopyForAccountant" Type="Edm.Boolean" Nullable="false" /><Property Name="IITemplateSubjectPrefix" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="IITemplate" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="CDTemplateSubjectPrefix" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="CDTemplate" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="LicenceType" Type="Edm.Byte" Nullable="false" /><Property Name="IsSetupCompleted" Type="Edm.Boolean" Nullable="false" /><Property Name="Version" Type="Edm.Int32" Nullable="false" /><Property Name="IsDeleted" Type="Edm.Boolean" Nullable="false" /><Property Name="Exported" Type="Edm.Byte" Nullable="false" /><Property Name="LogoId" Type="Edm.Int32" /><Property Name="StampId" Type="Edm.Int32" /><Property Name="IsSendReminder" Type="Edm.Boolean" Nullable="false" /><Property Name="ReminderTemplate" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="ReminderTemplateSubjectPrefix" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="ReminderDaysAfterMaturity" Type="Edm.Int32" Nullable="false" /><Property Name="ReminderMinValue" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="ProformaItemsPrefixText" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="ProformaItemsSuffixText" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="ProformaTemplateSubjectPrefix" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="ProformaTemplate" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="IsProformaTaxed" Type="Edm.Boolean" Nullable="false" /><Property Name="ReminderDaysBeforeMaturity" Type="Edm.Int16" Nullable="false" /><Property Name="DateLastChange" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="LoayalityCode" Type="Edm.String" Nullable="false" MaxLength="9" FixedLength="false" Unicode="true" /><Property Name="RecommenderCode" Type="Edm.String" Nullable="false" MaxLength="9" FixedLength="false" Unicode="true" /><Property Name="IsExchangeEnable" Type="Edm.Boolean" Nullable="false" /><Property Name="IsExchangeSaveToSentMail" Type="Edm.Boolean" Nullable="false" /><Property Name="ExchangeUser" Type="Edm.String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" /><Property Name="ExchangePassword" Type="Edm.String" Nullable="false" MaxLength="32" FixedLength="false" Unicode="true" /><Property Name="ExchangeDomain" Type="Edm.String" Nullable="false" MaxLength="32" FixedLength="false" Unicode="true" /><Property Name="IsExchangeAdvancedSettings" Type="Edm.Boolean" Nullable="false" /><Property Name="ExchangeEmail" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" /><Property Name="ExchangeServerAddress" Type="Edm.String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" /><Property Name="IsReverseCharge" Type="Edm.Boolean" Nullable="false" /><Property Name="NextReminderIntervalInDays" Type="Edm.Int32" Nullable="false" /><Property Name="EmailSendOptions" Type="Edm.Byte" Nullable="false" /><Property Name="EmailUser" Type="Edm.String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" /><Property Name="EmailPassword" Type="Edm.String" Nullable="false" MaxLength="96" FixedLength="false" Unicode="true" /><Property Name="EmailDomain" Type="Edm.String" Nullable="false" MaxLength="32" FixedLength="false" Unicode="true" /><Property Name="EmailSentMail" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" /><Property Name="EmailServerAddress" Type="Edm.String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" /><Property Name="IsEmailServerRequireVerification" Type="Edm.Boolean" Nullable="false" /><Property Name="EmailPort" Type="Edm.Int32" Nullable="false" /><Property Name="EmailSecurityType" Type="Edm.Byte" Nullable="false" /><Property Name="EmailSenderName" Type="Edm.String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" /><Property Name="AccountantCompanyEmail" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" /><Property Name="DefaultReportColorHcId" Type="Edm.Int32" /><Property Name="DefaultReportColorId" Type="Edm.Int32" /><Property Name="ProformaDefaultReportColorHcId" Type="Edm.Int32" /><Property Name="ProformaDefaultReportColorId" Type="Edm.Int32" /><Property Name="CashVoucherDefaultReportColorHcId" Type="Edm.Int32" /><Property Name="CashVoucherDefaultReportColorId" Type="Edm.Int32" /><Property Name="CreditNoteTemplate" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="CreditNoteTemplateSubjectPrefix" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="ColorScheme" Type="Edm.Byte" Nullable="false" /><Property Name="SelfDefinedColor" Type="Edm.String" Nullable="false" MaxLength="7" FixedLength="true" Unicode="false" /><Property Name="OwnLogo" Type="Edm.Boolean" Nullable="false" /><Property Name="ArchiveRemovedEntries" Type="Edm.Boolean" Nullable="false" /><NavigationProperty Name="ConstantSymbol" Relationship="DokladModel.FK_Agenda_ConstantSymbol" ToRole="ConstantSymbol" FromRole="Agenda" /><NavigationProperty Name="Currency" Relationship="DokladModel.FK_Agenda_Currency" ToRole="Currency" FromRole="Agenda" /><NavigationProperty Name="PaymentOption" Relationship="DokladModel.FK_Agenda_PaymentOption" ToRole="PaymentOption" FromRole="Agenda" /><NavigationProperty Name="BankAccounts" Relationship="DokladModel.FK_BankAccount_Agenda" ToRole="BankAccount" FromRole="Agenda" /><NavigationProperty Name="DocumentAddresses" Relationship="DokladModel.FK_DocumentAddress_Agenda" ToRole="DocumentAddress" FromRole="Agenda" /><NavigationProperty Name="Events" Relationship="DokladModel.FK_Event_Agenda" ToRole="Event" FromRole="Agenda" /><NavigationProperty Name="IssuedInvoices" Relationship="DokladModel.FK_IssuedInvoice_Agenda" ToRole="IssuedInvoice" FromRole="Agenda" /><NavigationProperty Name="IssuedInvoiceItems" Relationship="DokladModel.FK_IssuedInvoiceItem_Agenda" ToRole="IssuedInvoiceItem" FromRole="Agenda" /><NavigationProperty Name="PriceListItems" Relationship="DokladModel.FK_PriceListItem_Agenda" ToRole="PriceListItem" FromRole="Agenda" /><NavigationProperty Name="Contacts" Relationship="DokladModel.AgendaContact" ToRole="Contact" FromRole="Agenda" /><NavigationProperty Name="CashVoucherDefaultReportColor" Relationship="DokladModel.FK_Agenda_CashVoucherDefaultReportColor" ToRole="ReportColor" FromRole="Agenda" /><NavigationProperty Name="CashVoucherDefaultReportColorHc" Relationship="DokladModel.FK_Agenda_CashVoucherDefaultReportColorHc" ToRole="ReportColor" FromRole="Agenda" /><NavigationProperty Name="DefaultReportColor" Relationship="DokladModel.FK_Agenda_DefaultReportColor" ToRole="ReportColor" FromRole="Agenda" /><NavigationProperty Name="DefaultReportColorHc" Relationship="DokladModel.FK_Agenda_DefaultReportColorHc" ToRole="ReportColor" FromRole="Agenda" /><NavigationProperty Name="ProformaDefaultReportColor" Relationship="DokladModel.FK_Agenda_ProformaDefaultReportColor" ToRole="ReportColor" FromRole="Agenda" /><NavigationProperty Name="ProformaDefaultReportColorHc" Relationship="DokladModel.FK_Agenda_ProformaDefaultReportColorHc" ToRole="ReportColor" FromRole="Agenda" /><NavigationProperty Name="ReportColor" Relationship="DokladModel.FK_ReportColor_Agenda" ToRole="ReportColor" FromRole="Agenda" /></EntityType><EntityType Name="Bank"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="CountryId" Type="Edm.Int32" Nullable="false" /><Property Name="Code" Type="Edm.String" Nullable="false" MaxLength="10" FixedLength="false" Unicode="false" /><Property Name="Name" Type="Edm.String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" /><Property Name="Swift" Type="Edm.String" Nullable="false" MaxLength="11" FixedLength="false" Unicode="false" /><Property Name="NumberCode" Type="Edm.String" Nullable="false" MaxLength="4" FixedLength="false" Unicode="false" /><Property Name="DateLastChange" Type="Edm.DateTime" Nullable="false" Precision="3" /><NavigationProperty Name="Country" Relationship="DokladModel.FK_Bank_Country" ToRole="Country" FromRole="Bank" /><NavigationProperty Name="BankAccounts" Relationship="DokladModel.FK_BankAccount_Bank" ToRole="BankAccount" FromRole="Bank" /></EntityType><EntityType Name="BankAccount"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="AgendaId" Type="Edm.Int32" Nullable="false" /><Property Name="ContactId" Type="Edm.Int32" Nullable="false" /><Property Name="BankId" Type="Edm.Int32" /><Property Name="CurrencyId" Type="Edm.Int32" Nullable="false" /><Property Name="Name" Type="Edm.String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" /><Property Name="AccountNumber" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" /><Property Name="Iban" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" /><Property Name="IsDefault" Type="Edm.Boolean" Nullable="false" /><Property Name="IsDeleted" Type="Edm.Boolean" Nullable="false" /><Property Name="Exported" Type="Edm.Byte" Nullable="false" /><Property Name="Version" Type="Edm.Int32" Nullable="false" /><Property Name="Swift" Type="Edm.String" Nullable="false" MaxLength="11" FixedLength="false" Unicode="false" /><Property Name="DateLastChange" Type="Edm.DateTime" Nullable="false" Precision="3" /><NavigationProperty Name="Agendum" Relationship="DokladModel.FK_BankAccount_Agenda" ToRole="Agenda" FromRole="BankAccount" /><NavigationProperty Name="Bank" Relationship="DokladModel.FK_BankAccount_Bank" ToRole="Bank" FromRole="BankAccount" /><NavigationProperty Name="Contact" Relationship="DokladModel.FK_BankAccount_Contact" ToRole="Contact" FromRole="BankAccount" /><NavigationProperty Name="Currency" Relationship="DokladModel.FK_BankAccount_Currency" ToRole="Currency" FromRole="BankAccount" /></EntityType><EntityType Name="ConstantSymbol"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="Code" Type="Edm.String" Nullable="false" MaxLength="4" FixedLength="false" Unicode="false" /><Property Name="Name" Type="Edm.String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" /><Property Name="IsDefault" Type="Edm.Boolean" Nullable="false" /><Property Name="CountryId" Type="Edm.Int32" Nullable="false" /><Property Name="DateLastChange" Type="Edm.DateTime" Nullable="false" Precision="3" /><NavigationProperty Name="Agenda" Relationship="DokladModel.FK_Agenda_ConstantSymbol" ToRole="Agenda" FromRole="ConstantSymbol" /><NavigationProperty Name="Country" Relationship="DokladModel.FK_ConstantSymbol_Country" ToRole="Country" FromRole="ConstantSymbol" /><NavigationProperty Name="IssuedInvoices" Relationship="DokladModel.FK_IssuedInvoice_ConstantSymbol" ToRole="IssuedInvoice" FromRole="ConstantSymbol" /></EntityType><EntityType Name="Contact"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="AgendaId" Type="Edm.Int32" Nullable="false" /><Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="200" FixedLength="false" Unicode="true" /><Property Name="Firstname" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" /><Property Name="Surname" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" /><Property Name="Street" Type="Edm.String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" /><Property Name="City" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" /><Property Name="PostalCode" Type="Edm.String" Nullable="false" MaxLength="11" FixedLength="false" Unicode="false" /><Property Name="Email" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" /><Property Name="Phone" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" /><Property Name="Mobile" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" /><Property Name="Fax" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" /><Property Name="Www" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" /><Property Name="IdentificationNumber" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" /><Property Name="VatIdentificationNumber" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" /><Property Name="IsDeleted" Type="Edm.Boolean" Nullable="false" /><Property Name="Exported" Type="Edm.Byte" Nullable="false" /><Property Name="CountryId" Type="Edm.Int32" /><Property Name="Version" Type="Edm.Int32" Nullable="false" /><Property Name="Title" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" /><Property Name="AddressIdg" Type="Edm.Guid" Nullable="false" /><Property Name="CreditCheck" Type="Edm.Int32" Nullable="false" /><Property Name="IsSendReminder" Type="Edm.Boolean" Nullable="false" /><Property Name="VatIdentificationNumberSk" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" /><Property Name="DateLastChange" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="DiscountPercentage" Type="Edm.Decimal" Nullable="false" Precision="4" Scale="2" /><NavigationProperty Name="BankAccounts" Relationship="DokladModel.FK_BankAccount_Contact" ToRole="BankAccount" FromRole="Contact" /><NavigationProperty Name="Country" Relationship="DokladModel.FK_Contact_Country" ToRole="Country" FromRole="Contact" /><NavigationProperty Name="IssuedInvoices" Relationship="DokladModel.FK_IssuedInvoice_Contact" ToRole="IssuedInvoice" FromRole="Contact" /></EntityType><EntityType Name="Country"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" /><Property Name="CurrencyId" Type="Edm.Int32" Nullable="false" /><Property Name="ExchangeListId" Type="Edm.Int32" Nullable="false" /><Property Name="Code" Type="Edm.String" Nullable="false" MaxLength="2" FixedLength="false" Unicode="false" /><Property Name="Name" Type="Edm.String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" /><Property Name="NameEnglish" Type="Edm.String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" /><Property Name="IsDefault" Type="Edm.Boolean" Nullable="false" /><Property Name="Priority" Type="Edm.Int32" /><Property Name="DateLastChange" Type="Edm.DateTime" Nullable="false" Precision="3" /><NavigationProperty Name="Banks" Relationship="DokladModel.FK_Bank_Country" ToRole="Bank" FromRole="Country" /><NavigationProperty Name="ConstantSymbols" Relationship="DokladModel.FK_ConstantSymbol_Country" ToRole="ConstantSymbol" FromRole="Country" /><NavigationProperty Name="Contacts" Relationship="DokladModel.FK_Contact_Country" ToRole="Contact" FromRole="Country" /><NavigationProperty Name="Currency" Relationship="DokladModel.FK_Country_Currency" ToRole="Currency" FromRole="Country" /><NavigationProperty Name="VatRates" Relationship="DokladModel.FK_VatRate_Country" ToRole="VatRate" FromRole="Country" /><NavigationProperty Name="Events" Relationship="DokladModel.FK_Event_Country" ToRole="Event" FromRole="Country" /></EntityType><EntityType Name="Currency"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="Code" Type="Edm.String" Nullable="false" MaxLength="10" FixedLength="false" Unicode="false" /><Property Name="Name" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" /><Property Name="Symbol" Type="Edm.String" Nullable="false" MaxLength="5" FixedLength="false" Unicode="true" /><Property Name="Priority" Type="Edm.Int32" Nullable="false" /><Property Name="Country" Type="Edm.String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" /><Property Name="DateLastChange" Type="Edm.DateTime" Nullable="false" Precision="3" /><NavigationProperty Name="Agenda" Relationship="DokladModel.FK_Agenda_Currency" ToRole="Agenda" FromRole="Currency" /><NavigationProperty Name="BankAccounts" Relationship="DokladModel.FK_BankAccount_Currency" ToRole="BankAccount" FromRole="Currency" /><NavigationProperty Name="Countries" Relationship="DokladModel.FK_Country_Currency" ToRole="Country" FromRole="Currency" /><NavigationProperty Name="ExchangeRates" Relationship="DokladModel.FK_ExchangeRate_Currency" ToRole="ExchangeRate" FromRole="Currency" /><NavigationProperty Name="IssuedInvoices" Relationship="DokladModel.FK_IssuedInvoice_Currency" ToRole="IssuedInvoice" FromRole="Currency" /><NavigationProperty Name="PriceListItems" Relationship="DokladModel.FK_PriceListItem_Currency" ToRole="PriceListItem" FromRole="Currency" /></EntityType><EntityType Name="DocumentAddress"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="AgendaId" Type="Edm.Int32" Nullable="false" /><Property Name="NickName" Type="Edm.String" Nullable="false" MaxLength="200" FixedLength="false" Unicode="true" /><Property Name="Firstname" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" /><Property Name="Surname" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" /><Property Name="Street" Type="Edm.String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" /><Property Name="PostalCode" Type="Edm.String" Nullable="false" MaxLength="11" FixedLength="false" Unicode="false" /><Property Name="Country" Type="Edm.String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" /><Property Name="Email" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" /><Property Name="Phone" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" /><Property Name="Mobile" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" /><Property Name="Fax" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" /><Property Name="Www" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" /><Property Name="IdentificationNumber" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" /><Property Name="Bank" Type="Edm.String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" /><Property Name="BankNumberCode" Type="Edm.String" Nullable="false" MaxLength="4" FixedLength="false" Unicode="false" /><Property Name="AccountNumber" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" /><Property Name="Iban" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" /><Property Name="IsDeleted" Type="Edm.Boolean" Nullable="false" /><Property Name="Exported" Type="Edm.Byte" Nullable="false" /><Property Name="Version" Type="Edm.Int32" Nullable="false" /><Property Name="Title" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" /><Property Name="Swift" Type="Edm.String" Nullable="false" MaxLength="11" FixedLength="false" Unicode="false" /><Property Name="CountryId" Type="Edm.Int32" /><Property Name="DateLastChange" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="City" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" /><Property Name="VatIdentificationNumber" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" /><Property Name="VatIdentificationNumberSk" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" /><NavigationProperty Name="Agendum" Relationship="DokladModel.FK_DocumentAddress_Agenda" ToRole="Agenda" FromRole="DocumentAddress" /><NavigationProperty Name="MyIssuedInvoices" Relationship="DokladModel.FK_MyCompanyDocumentAdrress_DocumentAddress" ToRole="IssuedInvoice" FromRole="DocumentAddress" /><NavigationProperty Name="PurchaserIssuedInvoices" Relationship="DokladModel.FK_PurchaserDocumentAddress_DocumentAddress" ToRole="IssuedInvoice" FromRole="DocumentAddress" /></EntityType><EntityType Name="Event"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="EventCategoryId" Type="Edm.Int32" Nullable="false" /><Property Name="AgendaId" Type="Edm.Int32" /><Property Name="UserId" Type="Edm.Int32" /><Property Name="Name" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" /><Property Name="Description" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="DateFrom" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="DateTo" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="CountryId" Type="Edm.Int32" Nullable="false" /><Property Name="DateLastChange" Type="Edm.DateTime" Nullable="false" Precision="3" /><NavigationProperty Name="Agendum" Relationship="DokladModel.FK_Event_Agenda" ToRole="Agenda" FromRole="Event" /><NavigationProperty Name="EventCategory" Relationship="DokladModel.FK_Event_Category" ToRole="EventCategory" FromRole="Event" /><NavigationProperty Name="Country" Relationship="DokladModel.FK_Event_Country" ToRole="Country" FromRole="Event" /></EntityType><EntityType Name="EventCategory"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="CountryId" Type="Edm.Int32" Nullable="false" /><Property Name="Name" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" /><Property Name="Type" Type="Edm.Int16" Nullable="false" /><Property Name="Color" Type="Edm.String" Nullable="false" MaxLength="12" FixedLength="false" Unicode="false" /><Property Name="DateLastChange" Type="Edm.DateTime" Nullable="false" Precision="3" /><NavigationProperty Name="Events" Relationship="DokladModel.FK_Event_Category" ToRole="Event" FromRole="EventCategory" /></EntityType><EntityType Name="ExchangeList"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="Name" Type="Edm.String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" /><Property Name="DateLastChange" Type="Edm.DateTime" Nullable="false" Precision="3" /><NavigationProperty Name="ExchangeRates" Relationship="DokladModel.ExchangeListExchangeRate" ToRole="ExchangeRate" FromRole="ExchangeList" /></EntityType><EntityType Name="ExchangeRate"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="CurrencyId" Type="Edm.Int32" Nullable="false" /><Property Name="ExchangeListId" Type="Edm.Int32" /><Property Name="Date" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="Source" Type="Edm.Int32" Nullable="false" /><Property Name="Amount" Type="Edm.Decimal" Nullable="false" Precision="9" Scale="4" /><Property Name="DateLastChange" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="ExchangeRateValue" Type="Edm.Decimal" Nullable="false" Precision="9" Scale="4" /><NavigationProperty Name="Currency" Relationship="DokladModel.FK_ExchangeRate_Currency" ToRole="Currency" FromRole="ExchangeRate" /><NavigationProperty Name="ExchangeList" Relationship="DokladModel.ExchangeListExchangeRate" ToRole="ExchangeList" FromRole="ExchangeRate" /></EntityType><EntityType Name="IssuedInvoice"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="AgendaId" Type="Edm.Int32" Nullable="false" /><Property Name="PurchaserId" Type="Edm.Int32" /><Property Name="PurchaserDocumentAddressId" Type="Edm.Int32" Nullable="false" /><Property Name="MyCompanyDocumentAdrressId" Type="Edm.Int32" Nullable="false" /><Property Name="CurrencyId" Type="Edm.Int32" Nullable="false" /><Property Name="ConstantSymbolId" Type="Edm.Int32" /><Property Name="PaymentOptionId" Type="Edm.Int32" /><Property Name="DocumentNumber" Type="Edm.String" Nullable="false" MaxLength="10" FixedLength="false" Unicode="false" /><Property Name="DocumentSerialNumber" Type="Edm.Int32" Nullable="false" /><Property Name="VariableSymbol" Type="Edm.String" Nullable="false" MaxLength="10" FixedLength="false" Unicode="false" /><Property Name="Description" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="DateOfIssue" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="Maturity" Type="Edm.Int16" Nullable="false" /><Property Name="DateOfMaturity" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="DateOfTaxing" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="TotalWithoutVat" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="TotalWithVat" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="TotalVat" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="TotalWithoutVatHc" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="TotalWithVatHc" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="TotalVatHc" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="RoundingDifference" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="BaseTaxZeroRate" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="BaseTaxZeroRateHc" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="BaseTaxReducedRate1" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="BaseTaxReducedRate1Hc" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="TaxReducedRate1" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="TaxReducedRate1Hc" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="TotalReducedRate1" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="TotalReducedRate1Hc" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="BaseTaxReducedRate2" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="BaseTaxReducedRate2Hc" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="TaxReducedRate2" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="TaxReducedRate2Hc" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="TotalReducedRate2" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="TotalReducedRate2Hc" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="BaseTaxBasicRate" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="BaseTaxBasicRateHc" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="TaxBasicRate" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="TaxBasicRateHc" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="TotalBasicRate" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="TotalBasicRateHc" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="IsPaid" Type="Edm.Boolean" Nullable="false" /><Property Name="DateOfPayment" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="DateOfCancellation" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="Note" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="Status" Type="Edm.Byte" Nullable="false" /><Property Name="IsDeleted" Type="Edm.Boolean" Nullable="false" /><Property Name="Exported" Type="Edm.Byte" Nullable="false" /><Property Name="VatRateZero" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="VatRateReduced1" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="VatRateReduced2" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="VatRateBasic" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="Version" Type="Edm.Int32" Nullable="false" /><Property Name="ItemsTextPrefix" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="ItemsTextSuffix" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="IsSentToPurchaser" Type="Edm.Boolean" Nullable="false" /><Property Name="IsSentToAccountant" Type="Edm.Boolean" Nullable="false" /><Property Name="DateOfLastReminder" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="RemindersCount" Type="Edm.Int32" Nullable="false" /><Property Name="ExchangeRate" Type="Edm.Decimal" Nullable="false" Precision="9" Scale="4" /><Property Name="ExchangeRateAmount" Type="Edm.Decimal" Nullable="false" Precision="9" Scale="4" /><Property Name="OrderNumber" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" /><Property Name="AccountedByInvoiceId" Type="Edm.Int32" /><Property Name="DocumentType" Type="Edm.Byte" Nullable="false" /><Property Name="IsProformaTaxed" Type="Edm.Boolean" Nullable="false" /><Property Name="DateLastChange" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="CashVoucherNumber" Type="Edm.String" Nullable="false" MaxLength="10" FixedLength="false" Unicode="false" /><Property Name="CashVoucherSerialNumber" Type="Edm.Int32" Nullable="false" /><Property Name="DateOfAccountingEvent" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="PaymentSessionId" Type="Edm.Int64" Nullable="false" /><Property Name="CopyCount" Type="Edm.Int32" Nullable="false" /><Property Name="ReportColorId" Type="Edm.Int32" /><Property Name="CashVoucherReportColorId" Type="Edm.Int32" /><Property Name="DateOfImport" Type="Edm.DateTime" Precision="3" /><Property Name="ImportType" Type="Edm.Byte" Nullable="false" /><Property Name="CreditNoteForDocumentId" Type="Edm.Int32" /><Property Name="DateOfVatClaim" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="NoteForCreditNote" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="CreditNoteReason" Type="Edm.String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /><Property Name="DateOfIssueTaxReceiptForPayment" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="PaymentStatus" Type="Edm.Byte" Nullable="false" /><NavigationProperty Name="Agendum" Relationship="DokladModel.FK_IssuedInvoice_Agenda" ToRole="Agenda" FromRole="IssuedInvoice" /><NavigationProperty Name="ConstantSymbol" Relationship="DokladModel.FK_IssuedInvoice_ConstantSymbol" ToRole="ConstantSymbol" FromRole="IssuedInvoice" /><NavigationProperty Name="Purchaser" Relationship="DokladModel.FK_IssuedInvoice_Contact" ToRole="Contact" FromRole="IssuedInvoice" /><NavigationProperty Name="Currency" Relationship="DokladModel.FK_IssuedInvoice_Currency" ToRole="Currency" FromRole="IssuedInvoice" /><NavigationProperty Name="MyCompanyDocumentAddress" Relationship="DokladModel.FK_MyCompanyDocumentAdrress_DocumentAddress" ToRole="DocumentAddress" FromRole="IssuedInvoice" /><NavigationProperty Name="PurchaserDocumentAddress" Relationship="DokladModel.FK_PurchaserDocumentAddress_DocumentAddress" ToRole="DocumentAddress" FromRole="IssuedInvoice" /><NavigationProperty Name="ProformaList" Relationship="DokladModel.FK_IssuedInvoice_AccountedByInvoice" ToRole="IssuedInvoice1" FromRole="IssuedInvoice" /><NavigationProperty Name="AccountedIssuedInvoice" Relationship="DokladModel.FK_IssuedInvoice_AccountedByInvoice" ToRole="IssuedInvoice" FromRole="IssuedInvoice1" /><NavigationProperty Name="PaymentOption" Relationship="DokladModel.FK_IssuedInvoice_PaymentOption" ToRole="PaymentOption" FromRole="IssuedInvoice" /><NavigationProperty Name="IssuedInvoiceItems" Relationship="DokladModel.FK_IssuedInvoiceItem_Invoice" ToRole="IssuedInvoiceItem" FromRole="IssuedInvoice" /><NavigationProperty Name="CashVoucherReportColor" Relationship="DokladModel.FK_IssuedInvoice_CashVoucherReportColor" ToRole="ReportColor" FromRole="IssuedInvoice" /><NavigationProperty Name="ReportColor" Relationship="DokladModel.FK_IssuedInvoice_ReportColor" ToRole="ReportColor" FromRole="IssuedInvoice" /><NavigationProperty Name="CreditNoteList" Relationship="DokladModel.FK_CreditNoteIssuedInvoice_IssuedInvoice" ToRole="IssuedInvoice1" FromRole="IssuedInvoice" /><NavigationProperty Name="DocumentOfCreditNote" Relationship="DokladModel.FK_CreditNoteIssuedInvoice_IssuedInvoice" ToRole="IssuedInvoice" FromRole="IssuedInvoice1" /></EntityType><EntityType Name="IssuedInvoiceItem"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="AgendaId" Type="Edm.Int32" Nullable="false" /><Property Name="InvoiceId" Type="Edm.Int32" Nullable="false" /><Property Name="Code" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" /><Property Name="Name" Type="Edm.String" Nullable="false" MaxLength="200" FixedLength="false" Unicode="true" /><Property Name="Unit" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" /><Property Name="Amount" Type="Edm.Decimal" Nullable="false" Precision="18" Scale="4" /><Property Name="PriceType" Type="Edm.Byte" Nullable="false" /><Property Name="PriceUnitWithVat" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="PriceUnitWithoutVat" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="PriceUnitVat" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="PriceUnitWithVatHc" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="PriceUnitVatHc" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="PriceUnitWithoutVatHc" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="VatRate" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="PriceTotalWithVat" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="PriceTotalWithoutVat" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="PriceTotalWithVatHc" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="PriceTotalWithoutVatHc" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="VatTotal" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="VatTotalHc" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="IsDeleted" Type="Edm.Boolean" Nullable="false" /><Property Name="Exported" Type="Edm.Byte" Nullable="false" /><Property Name="VatRateType" Type="Edm.Byte" Nullable="false" /><Property Name="Version" Type="Edm.Int32" Nullable="false" /><Property Name="IsEditFlag" Type="Edm.Boolean" Nullable="false" /><Property Name="Price" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="TotalPrice" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="Rank" Type="Edm.Int32" Nullable="false" /><Property Name="ItemType" Type="Edm.Byte" Nullable="false" /><Property Name="IsRoundedItem" Type="Edm.Boolean" Nullable="false" /><Property Name="IsTaxMovement" Type="Edm.Boolean" Nullable="false" /><Property Name="DateLastChange" Type="Edm.DateTime" Nullable="false" Precision="3" /><NavigationProperty Name="Agendum" Relationship="DokladModel.FK_IssuedInvoiceItem_Agenda" ToRole="Agenda" FromRole="IssuedInvoiceItem" /><NavigationProperty Name="IssuedInvoice" Relationship="DokladModel.FK_IssuedInvoiceItem_Invoice" ToRole="IssuedInvoice" FromRole="IssuedInvoiceItem" /></EntityType><EntityType Name="PaymentOption"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="Code" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="false" /><Property Name="Name" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" /><Property Name="IsDefault" Type="Edm.Boolean" Nullable="false" /><Property Name="IsAutoPayment" Type="Edm.Boolean" Nullable="false" /><Property Name="DateLastChange" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="IsRounded" Type="Edm.Boolean" Nullable="false" /><NavigationProperty Name="Agenda" Relationship="DokladModel.FK_Agenda_PaymentOption" ToRole="Agenda" FromRole="PaymentOption" /><NavigationProperty Name="IssuedInvoices" Relationship="DokladModel.FK_IssuedInvoice_PaymentOption" ToRole="IssuedInvoice" FromRole="PaymentOption" /></EntityType><EntityType Name="PriceListItem"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="AgendaId" Type="Edm.Int32" Nullable="false" /><Property Name="CurrencyId" Type="Edm.Int32" Nullable="false" /><Property Name="Code" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" /><Property Name="Name" Type="Edm.String" Nullable="false" MaxLength="200" FixedLength="false" Unicode="true" /><Property Name="Unit" Type="Edm.String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" /><Property Name="Price" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="PriceType" Type="Edm.Byte" Nullable="false" /><Property Name="IsDeleted" Type="Edm.Boolean" Nullable="false" /><Property Name="Exported" Type="Edm.Byte" Nullable="false" /><Property Name="Amount" Type="Edm.Decimal" Nullable="false" Precision="18" Scale="4" /><Property Name="Version" Type="Edm.Int32" Nullable="false" /><Property Name="DateLastChange" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="VatRateType" Type="Edm.Byte" Nullable="false" /><NavigationProperty Name="Agendum" Relationship="DokladModel.FK_PriceListItem_Agenda" ToRole="Agenda" FromRole="PriceListItem" /><NavigationProperty Name="Currency" Relationship="DokladModel.FK_PriceListItem_Currency" ToRole="Currency" FromRole="PriceListItem" /></EntityType><EntityType Name="VatRate"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="Name" Type="Edm.String" MaxLength="50" FixedLength="false" Unicode="true" /><Property Name="RateType" Type="Edm.Byte" Nullable="false" /><Property Name="Rate" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="DateValidityFrom" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="DateValidityTo" Type="Edm.DateTime" Nullable="false" Precision="3" /><Property Name="CountryId" Type="Edm.Int32" Nullable="false" /><Property Name="DateLastChange" Type="Edm.DateTime" Nullable="false" Precision="3" /><NavigationProperty Name="Country" Relationship="DokladModel.FK_VatRate_Country" ToRole="Country" FromRole="VatRate" /></EntityType><EntityType Name="ReportColor"><Key><PropertyRef Name="Id" /></Key><Property Name="Id" Type="Edm.Int32" Nullable="false" p6:StoreGeneratedPattern="Identity" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="AgendaId" Type="Edm.Int32" Nullable="false" /><Property Name="ReportLanguageId" Type="Edm.Int32" Nullable="false" /><Property Name="Color" Type="Edm.String" Nullable="false" MaxLength="7" FixedLength="false" Unicode="false" /><Property Name="DateLastChange" Type="Edm.DateTime" Nullable="false" Precision="3" /><NavigationProperty Name="AgendaCashVoucherDefaultReportColor" Relationship="DokladModel.FK_Agenda_CashVoucherDefaultReportColor" ToRole="Agenda" FromRole="ReportColor" /><NavigationProperty Name="AgendaCashVoucherDefaultReportColorHc" Relationship="DokladModel.FK_Agenda_CashVoucherDefaultReportColorHc" ToRole="Agenda" FromRole="ReportColor" /><NavigationProperty Name="AgendaDefaultReportColor" Relationship="DokladModel.FK_Agenda_DefaultReportColor" ToRole="Agenda" FromRole="ReportColor" /><NavigationProperty Name="AgendaDefaultReportColorHc" Relationship="DokladModel.FK_Agenda_DefaultReportColorHc" ToRole="Agenda" FromRole="ReportColor" /><NavigationProperty Name="AgendaProformaDefaultReportColor" Relationship="DokladModel.FK_Agenda_ProformaDefaultReportColor" ToRole="Agenda" FromRole="ReportColor" /><NavigationProperty Name="AgendaProformaDefaultReportColorHc" Relationship="DokladModel.FK_Agenda_ProformaDefaultReportColorHc" ToRole="Agenda" FromRole="ReportColor" /><NavigationProperty Name="IssuedInvoicesCashVoucherReportColor" Relationship="DokladModel.FK_IssuedInvoice_CashVoucherReportColor" ToRole="IssuedInvoice" FromRole="ReportColor" /><NavigationProperty Name="IssuedInvoicesReportColor" Relationship="DokladModel.FK_IssuedInvoice_ReportColor" ToRole="IssuedInvoice" FromRole="ReportColor" /><NavigationProperty Name="Agendum" Relationship="DokladModel.FK_ReportColor_Agenda" ToRole="Agenda" FromRole="ReportColor" /></EntityType><ComplexType Name="SummaryAgenda"><Property Name="Contacts" Type="Edm.Int32" Nullable="false" /><Property Name="IssuedInvoices" Type="Edm.Int32" Nullable="false" /><Property Name="PriceListItems" Type="Edm.Int32" Nullable="false" /></ComplexType><ComplexType Name="SummaryQuarter"><Property Name="Title" Type="Edm.String" Nullable="false" /><Property Name="Billed" Type="Edm.Decimal" Nullable="false" /><Property Name="TotalPaid" Type="Edm.Decimal" Nullable="false" /><Property Name="TotalUnPaid" Type="Edm.Decimal" Nullable="false" /><Property Name="Rank" Type="Edm.Int32" Nullable="false" /></ComplexType><ComplexType Name="SummaryTopPartner"><Property Name="Name" Type="Edm.String" Nullable="false" /><Property Name="TotalWithVatHc" Type="Edm.Decimal" Nullable="false" /><Property Name="ContactId" Type="Edm.Int32" Nullable="false" /></ComplexType><Association Name="FK_Agenda_ConstantSymbol"><End Type="DokladModel.ConstantSymbol" Role="ConstantSymbol" Multiplicity="0..1" /><End Type="DokladModel.Agenda" Role="Agenda" Multiplicity="*" /><ReferentialConstraint><Principal Role="ConstantSymbol"><PropertyRef Name="Id" /></Principal><Dependent Role="Agenda"><PropertyRef Name="ConstantSymbolId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_Agenda_Currency"><End Type="DokladModel.Currency" Role="Currency" Multiplicity="1" /><End Type="DokladModel.Agenda" Role="Agenda" Multiplicity="*" /><ReferentialConstraint><Principal Role="Currency"><PropertyRef Name="Id" /></Principal><Dependent Role="Agenda"><PropertyRef Name="CurrencyId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_Agenda_PaymentOption"><End Type="DokladModel.PaymentOption" Role="PaymentOption" Multiplicity="0..1" /><End Type="DokladModel.Agenda" Role="Agenda" Multiplicity="*" /><ReferentialConstraint><Principal Role="PaymentOption"><PropertyRef Name="Id" /></Principal><Dependent Role="Agenda"><PropertyRef Name="PaymentOptionId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_BankAccount_Agenda"><End Type="DokladModel.Agenda" Role="Agenda" Multiplicity="1" /><End Type="DokladModel.BankAccount" Role="BankAccount" Multiplicity="*" /><ReferentialConstraint><Principal Role="Agenda"><PropertyRef Name="Id" /></Principal><Dependent Role="BankAccount"><PropertyRef Name="AgendaId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_DocumentAddress_Agenda"><End Type="DokladModel.Agenda" Role="Agenda" Multiplicity="1" /><End Type="DokladModel.DocumentAddress" Role="DocumentAddress" Multiplicity="*" /><ReferentialConstraint><Principal Role="Agenda"><PropertyRef Name="Id" /></Principal><Dependent Role="DocumentAddress"><PropertyRef Name="AgendaId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_Event_Agenda"><End Type="DokladModel.Agenda" Role="Agenda" Multiplicity="0..1" /><End Type="DokladModel.Event" Role="Event" Multiplicity="*" /><ReferentialConstraint><Principal Role="Agenda"><PropertyRef Name="Id" /></Principal><Dependent Role="Event"><PropertyRef Name="AgendaId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_IssuedInvoice_Agenda"><End Type="DokladModel.Agenda" Role="Agenda" Multiplicity="1" /><End Type="DokladModel.IssuedInvoice" Role="IssuedInvoice" Multiplicity="*" /><ReferentialConstraint><Principal Role="Agenda"><PropertyRef Name="Id" /></Principal><Dependent Role="IssuedInvoice"><PropertyRef Name="AgendaId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_IssuedInvoiceItem_Agenda"><End Type="DokladModel.Agenda" Role="Agenda" Multiplicity="1" /><End Type="DokladModel.IssuedInvoiceItem" Role="IssuedInvoiceItem" Multiplicity="*" /><ReferentialConstraint><Principal Role="Agenda"><PropertyRef Name="Id" /></Principal><Dependent Role="IssuedInvoiceItem"><PropertyRef Name="AgendaId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_PriceListItem_Agenda"><End Type="DokladModel.Agenda" Role="Agenda" Multiplicity="1" /><End Type="DokladModel.PriceListItem" Role="PriceListItem" Multiplicity="*" /><ReferentialConstraint><Principal Role="Agenda"><PropertyRef Name="Id" /></Principal><Dependent Role="PriceListItem"><PropertyRef Name="AgendaId" /></Dependent></ReferentialConstraint></Association><Association Name="AgendaContact"><End Type="DokladModel.Agenda" Role="Agenda" Multiplicity="1" /><End Type="DokladModel.Contact" Role="Contact" Multiplicity="*" /><ReferentialConstraint><Principal Role="Agenda"><PropertyRef Name="Id" /></Principal><Dependent Role="Contact"><PropertyRef Name="AgendaId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_Agenda_CashVoucherDefaultReportColor"><End Type="DokladModel.ReportColor" Role="ReportColor" Multiplicity="0..1" /><End Type="DokladModel.Agenda" Role="Agenda" Multiplicity="*" /><ReferentialConstraint><Principal Role="ReportColor"><PropertyRef Name="Id" /></Principal><Dependent Role="Agenda"><PropertyRef Name="CashVoucherDefaultReportColorId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_Agenda_CashVoucherDefaultReportColorHc"><End Type="DokladModel.ReportColor" Role="ReportColor" Multiplicity="0..1" /><End Type="DokladModel.Agenda" Role="Agenda" Multiplicity="*" /><ReferentialConstraint><Principal Role="ReportColor"><PropertyRef Name="Id" /></Principal><Dependent Role="Agenda"><PropertyRef Name="CashVoucherDefaultReportColorHcId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_Agenda_DefaultReportColor"><End Type="DokladModel.ReportColor" Role="ReportColor" Multiplicity="0..1" /><End Type="DokladModel.Agenda" Role="Agenda" Multiplicity="*" /><ReferentialConstraint><Principal Role="ReportColor"><PropertyRef Name="Id" /></Principal><Dependent Role="Agenda"><PropertyRef Name="DefaultReportColorId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_Agenda_DefaultReportColorHc"><End Type="DokladModel.ReportColor" Role="ReportColor" Multiplicity="0..1" /><End Type="DokladModel.Agenda" Role="Agenda" Multiplicity="*" /><ReferentialConstraint><Principal Role="ReportColor"><PropertyRef Name="Id" /></Principal><Dependent Role="Agenda"><PropertyRef Name="DefaultReportColorHcId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_Agenda_ProformaDefaultReportColor"><End Type="DokladModel.ReportColor" Role="ReportColor" Multiplicity="0..1" /><End Type="DokladModel.Agenda" Role="Agenda" Multiplicity="*" /><ReferentialConstraint><Principal Role="ReportColor"><PropertyRef Name="Id" /></Principal><Dependent Role="Agenda"><PropertyRef Name="ProformaDefaultReportColorId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_Agenda_ProformaDefaultReportColorHc"><End Type="DokladModel.ReportColor" Role="ReportColor" Multiplicity="0..1" /><End Type="DokladModel.Agenda" Role="Agenda" Multiplicity="*" /><ReferentialConstraint><Principal Role="ReportColor"><PropertyRef Name="Id" /></Principal><Dependent Role="Agenda"><PropertyRef Name="ProformaDefaultReportColorHcId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_ReportColor_Agenda"><End Type="DokladModel.Agenda" Role="Agenda" Multiplicity="1" /><End Type="DokladModel.ReportColor" Role="ReportColor" Multiplicity="*" /><ReferentialConstraint><Principal Role="Agenda"><PropertyRef Name="Id" /></Principal><Dependent Role="ReportColor"><PropertyRef Name="AgendaId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_Bank_Country"><End Type="DokladModel.Country" Role="Country" Multiplicity="1" /><End Type="DokladModel.Bank" Role="Bank" Multiplicity="*" /><ReferentialConstraint><Principal Role="Country"><PropertyRef Name="Id" /></Principal><Dependent Role="Bank"><PropertyRef Name="CountryId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_BankAccount_Bank"><End Type="DokladModel.Bank" Role="Bank" Multiplicity="0..1" /><End Type="DokladModel.BankAccount" Role="BankAccount" Multiplicity="*" /><ReferentialConstraint><Principal Role="Bank"><PropertyRef Name="Id" /></Principal><Dependent Role="BankAccount"><PropertyRef Name="BankId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_BankAccount_Contact"><End Type="DokladModel.Contact" Role="Contact" Multiplicity="1" /><End Type="DokladModel.BankAccount" Role="BankAccount" Multiplicity="*" /><ReferentialConstraint><Principal Role="Contact"><PropertyRef Name="Id" /></Principal><Dependent Role="BankAccount"><PropertyRef Name="ContactId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_BankAccount_Currency"><End Type="DokladModel.Currency" Role="Currency" Multiplicity="1" /><End Type="DokladModel.BankAccount" Role="BankAccount" Multiplicity="*" /><ReferentialConstraint><Principal Role="Currency"><PropertyRef Name="Id" /></Principal><Dependent Role="BankAccount"><PropertyRef Name="CurrencyId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_ConstantSymbol_Country"><End Type="DokladModel.Country" Role="Country" Multiplicity="1"><OnDelete Action="Cascade" /></End><End Type="DokladModel.ConstantSymbol" Role="ConstantSymbol" Multiplicity="*" /><ReferentialConstraint><Principal Role="Country"><PropertyRef Name="Id" /></Principal><Dependent Role="ConstantSymbol"><PropertyRef Name="CountryId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_IssuedInvoice_ConstantSymbol"><End Type="DokladModel.ConstantSymbol" Role="ConstantSymbol" Multiplicity="0..1" /><End Type="DokladModel.IssuedInvoice" Role="IssuedInvoice" Multiplicity="*" /><ReferentialConstraint><Principal Role="ConstantSymbol"><PropertyRef Name="Id" /></Principal><Dependent Role="IssuedInvoice"><PropertyRef Name="ConstantSymbolId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_Contact_Country"><End Type="DokladModel.Country" Role="Country" Multiplicity="0..1" /><End Type="DokladModel.Contact" Role="Contact" Multiplicity="*" /><ReferentialConstraint><Principal Role="Country"><PropertyRef Name="Id" /></Principal><Dependent Role="Contact"><PropertyRef Name="CountryId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_IssuedInvoice_Contact"><End Type="DokladModel.Contact" Role="Contact" Multiplicity="0..1" /><End Type="DokladModel.IssuedInvoice" Role="IssuedInvoice" Multiplicity="*" /><ReferentialConstraint><Principal Role="Contact"><PropertyRef Name="Id" /></Principal><Dependent Role="IssuedInvoice"><PropertyRef Name="PurchaserId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_Country_Currency"><End Type="DokladModel.Currency" Role="Currency" Multiplicity="1" /><End Type="DokladModel.Country" Role="Country" Multiplicity="*" /><ReferentialConstraint><Principal Role="Currency"><PropertyRef Name="Id" /></Principal><Dependent Role="Country"><PropertyRef Name="CurrencyId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_VatRate_Country"><End Type="DokladModel.Country" Role="Country" Multiplicity="1"><OnDelete Action="Cascade" /></End><End Type="DokladModel.VatRate" Role="VatRate" Multiplicity="*" /><ReferentialConstraint><Principal Role="Country"><PropertyRef Name="Id" /></Principal><Dependent Role="VatRate"><PropertyRef Name="CountryId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_Event_Country"><End Type="DokladModel.Country" Role="Country" Multiplicity="1" /><End Type="DokladModel.Event" Role="Event" Multiplicity="*" /><ReferentialConstraint><Principal Role="Country"><PropertyRef Name="Id" /></Principal><Dependent Role="Event"><PropertyRef Name="CountryId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_ExchangeRate_Currency"><End Type="DokladModel.Currency" Role="Currency" Multiplicity="1"><OnDelete Action="Cascade" /></End><End Type="DokladModel.ExchangeRate" Role="ExchangeRate" Multiplicity="*" /><ReferentialConstraint><Principal Role="Currency"><PropertyRef Name="Id" /></Principal><Dependent Role="ExchangeRate"><PropertyRef Name="CurrencyId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_IssuedInvoice_Currency"><End Type="DokladModel.Currency" Role="Currency" Multiplicity="1" /><End Type="DokladModel.IssuedInvoice" Role="IssuedInvoice" Multiplicity="*" /><ReferentialConstraint><Principal Role="Currency"><PropertyRef Name="Id" /></Principal><Dependent Role="IssuedInvoice"><PropertyRef Name="CurrencyId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_PriceListItem_Currency"><End Type="DokladModel.Currency" Role="Currency" Multiplicity="1" /><End Type="DokladModel.PriceListItem" Role="PriceListItem" Multiplicity="*" /><ReferentialConstraint><Principal Role="Currency"><PropertyRef Name="Id" /></Principal><Dependent Role="PriceListItem"><PropertyRef Name="CurrencyId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_MyCompanyDocumentAdrress_DocumentAddress"><End Type="DokladModel.DocumentAddress" Role="DocumentAddress" Multiplicity="1" /><End Type="DokladModel.IssuedInvoice" Role="IssuedInvoice" Multiplicity="*" /><ReferentialConstraint><Principal Role="DocumentAddress"><PropertyRef Name="Id" /></Principal><Dependent Role="IssuedInvoice"><PropertyRef Name="MyCompanyDocumentAdrressId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_PurchaserDocumentAddress_DocumentAddress"><End Type="DokladModel.DocumentAddress" Role="DocumentAddress" Multiplicity="1" /><End Type="DokladModel.IssuedInvoice" Role="IssuedInvoice" Multiplicity="*" /><ReferentialConstraint><Principal Role="DocumentAddress"><PropertyRef Name="Id" /></Principal><Dependent Role="IssuedInvoice"><PropertyRef Name="PurchaserDocumentAddressId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_Event_Category"><End Type="DokladModel.EventCategory" Role="EventCategory" Multiplicity="1" /><End Type="DokladModel.Event" Role="Event" Multiplicity="*" /><ReferentialConstraint><Principal Role="EventCategory"><PropertyRef Name="Id" /></Principal><Dependent Role="Event"><PropertyRef Name="EventCategoryId" /></Dependent></ReferentialConstraint></Association><Association Name="ExchangeListExchangeRate"><End Type="DokladModel.ExchangeList" Role="ExchangeList" Multiplicity="0..1" /><End Type="DokladModel.ExchangeRate" Role="ExchangeRate" Multiplicity="*" /><ReferentialConstraint><Principal Role="ExchangeList"><PropertyRef Name="Id" /></Principal><Dependent Role="ExchangeRate"><PropertyRef Name="ExchangeListId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_IssuedInvoice_AccountedByInvoice"><End Type="DokladModel.IssuedInvoice" Role="IssuedInvoice" Multiplicity="0..1" /><End Type="DokladModel.IssuedInvoice" Role="IssuedInvoice1" Multiplicity="*" /><ReferentialConstraint><Principal Role="IssuedInvoice"><PropertyRef Name="Id" /></Principal><Dependent Role="IssuedInvoice1"><PropertyRef Name="AccountedByInvoiceId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_IssuedInvoice_PaymentOption"><End Type="DokladModel.PaymentOption" Role="PaymentOption" Multiplicity="0..1" /><End Type="DokladModel.IssuedInvoice" Role="IssuedInvoice" Multiplicity="*" /><ReferentialConstraint><Principal Role="PaymentOption"><PropertyRef Name="Id" /></Principal><Dependent Role="IssuedInvoice"><PropertyRef Name="PaymentOptionId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_IssuedInvoiceItem_Invoice"><End Type="DokladModel.IssuedInvoice" Role="IssuedInvoice" Multiplicity="1" /><End Type="DokladModel.IssuedInvoiceItem" Role="IssuedInvoiceItem" Multiplicity="*" /><ReferentialConstraint><Principal Role="IssuedInvoice"><PropertyRef Name="Id" /></Principal><Dependent Role="IssuedInvoiceItem"><PropertyRef Name="InvoiceId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_IssuedInvoice_CashVoucherReportColor"><End Type="DokladModel.ReportColor" Role="ReportColor" Multiplicity="0..1" /><End Type="DokladModel.IssuedInvoice" Role="IssuedInvoice" Multiplicity="*" /><ReferentialConstraint><Principal Role="ReportColor"><PropertyRef Name="Id" /></Principal><Dependent Role="IssuedInvoice"><PropertyRef Name="CashVoucherReportColorId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_IssuedInvoice_ReportColor"><End Type="DokladModel.ReportColor" Role="ReportColor" Multiplicity="0..1" /><End Type="DokladModel.IssuedInvoice" Role="IssuedInvoice" Multiplicity="*" /><ReferentialConstraint><Principal Role="ReportColor"><PropertyRef Name="Id" /></Principal><Dependent Role="IssuedInvoice"><PropertyRef Name="ReportColorId" /></Dependent></ReferentialConstraint></Association><Association Name="FK_CreditNoteIssuedInvoice_IssuedInvoice"><End Type="DokladModel.IssuedInvoice" Role="IssuedInvoice" Multiplicity="0..1" /><End Type="DokladModel.IssuedInvoice" Role="IssuedInvoice1" Multiplicity="*" /><ReferentialConstraint><Principal Role="IssuedInvoice"><PropertyRef Name="Id" /></Principal><Dependent Role="IssuedInvoice1"><PropertyRef Name="CreditNoteForDocumentId" /></Dependent></ReferentialConstraint></Association></Schema><Schema Namespace="Doklad.DAL" xmlns="http://schemas.microsoft.com/ado/2009/11/edm"><EntityContainer Name="DokladEntities" m:IsDefaultEntityContainer="true" p6:LazyLoadingEnabled="true" xmlns:p6="http://schemas.microsoft.com/ado/2009/02/edm/annotation"><EntitySet Name="Agendas" EntityType="DokladModel.Agenda" /><EntitySet Name="Banks" EntityType="DokladModel.Bank" /><EntitySet Name="BankAccounts" EntityType="DokladModel.BankAccount" /><EntitySet Name="ConstantSymbols" EntityType="DokladModel.ConstantSymbol" /><EntitySet Name="Contacts" EntityType="DokladModel.Contact" /><EntitySet Name="Countries" EntityType="DokladModel.Country" /><EntitySet Name="Currencies" EntityType="DokladModel.Currency" /><EntitySet Name="DocumentAddresses" EntityType="DokladModel.DocumentAddress" /><EntitySet Name="Events" EntityType="DokladModel.Event" /><EntitySet Name="EventCategories" EntityType="DokladModel.EventCategory" /><EntitySet Name="ExchangeLists" EntityType="DokladModel.ExchangeList" /><EntitySet Name="ExchangeRates" EntityType="DokladModel.ExchangeRate" /><EntitySet Name="IssuedInvoices" EntityType="DokladModel.IssuedInvoice" /><EntitySet Name="IssuedInvoiceItems" EntityType="DokladModel.IssuedInvoiceItem" /><EntitySet Name="PaymentOptions" EntityType="DokladModel.PaymentOption" /><EntitySet Name="PriceListItems" EntityType="DokladModel.PriceListItem" /><EntitySet Name="VatRates" EntityType="DokladModel.VatRate" /><EntitySet Name="ReportColors" EntityType="DokladModel.ReportColor" /><FunctionImport Name="CanDeleteContact" ReturnType="Edm.Boolean" m:HttpMethod="GET"><Parameter Name="contactId" Type="Edm.Int32" Nullable="false" /></FunctionImport><FunctionImport Name="DeleteContact" ReturnType="Edm.Boolean" m:HttpMethod="GET"><Parameter Name="contactId" Type="Edm.Int32" Nullable="false" /></FunctionImport><FunctionImport Name="DeleteIssuedInvoice" ReturnType="Edm.Boolean" m:HttpMethod="GET"><Parameter Name="issuedInvoiceId" Type="Edm.Int32" Nullable="false" /></FunctionImport><FunctionImport Name="GetCashVoucherPdf" ReturnType="Edm.String" m:HttpMethod="GET"><Parameter Name="issuedInvoiceId" Type="Edm.Int32" Nullable="false" /></FunctionImport><FunctionImport Name="GetCashVoucherUncompressedPdf" ReturnType="Edm.String" m:HttpMethod="GET"><Parameter Name="issuedInvoiceId" Type="Edm.Int32" Nullable="false" /></FunctionImport><FunctionImport Name="GetChangesBanks" ReturnType="Collection(DokladModel.Bank)" EntitySet="Banks" m:HttpMethod="GET"><Parameter Name="dateLastChange" Type="Edm.DateTime" Nullable="false" /></FunctionImport><FunctionImport Name="GetChangesConstantsSymbols" ReturnType="Collection(DokladModel.ConstantSymbol)" EntitySet="ConstantSymbols" m:HttpMethod="GET"><Parameter Name="dateLastChange" Type="Edm.DateTime" Nullable="false" /></FunctionImport><FunctionImport Name="GetChangesCountries" ReturnType="Collection(DokladModel.Country)" EntitySet="Countries" m:HttpMethod="GET"><Parameter Name="dateLastChange" Type="Edm.DateTime" Nullable="false" /></FunctionImport><FunctionImport Name="GetChangesCurrencies" ReturnType="Collection(DokladModel.Currency)" EntitySet="Currencies" m:HttpMethod="GET"><Parameter Name="dateLastChange" Type="Edm.DateTime" Nullable="false" /></FunctionImport><FunctionImport Name="GetChangesInModel" ReturnType="Collection(Edm.String)" m:HttpMethod="GET"><Parameter Name="dateLastChange" Type="Edm.DateTime" Nullable="false" /></FunctionImport><FunctionImport Name="GetChangesPaymentOptions" ReturnType="Collection(DokladModel.PaymentOption)" EntitySet="PaymentOptions" m:HttpMethod="GET"><Parameter Name="dateLastChange" Type="Edm.DateTime" Nullable="false" /></FunctionImport><FunctionImport Name="GetChangesVatRates" ReturnType="Collection(DokladModel.VatRate)" EntitySet="VatRates" m:HttpMethod="GET"><Parameter Name="dateLastChange" Type="Edm.DateTime" Nullable="false" /></FunctionImport><FunctionImport Name="GetIssuedInvoicePdf" ReturnType="Edm.String" m:HttpMethod="GET"><Parameter Name="issuedInvoiceId" Type="Edm.Int32" Nullable="false" /></FunctionImport><FunctionImport Name="GetIssuedInvoiceUncompressedPdf" ReturnType="Edm.String" m:HttpMethod="GET"><Parameter Name="issuedInvoiceId" Type="Edm.Int32" Nullable="false" /></FunctionImport><FunctionImport Name="GetSummaryAgenda" ReturnType="Collection(DokladModel.SummaryAgenda)" m:HttpMethod="GET" /><FunctionImport Name="GetSummaryQuarter" ReturnType="Collection(DokladModel.SummaryQuarter)" m:HttpMethod="GET" /><FunctionImport Name="GetSummaryTopPartners" ReturnType="Collection(DokladModel.SummaryTopPartner)" m:HttpMethod="GET" /><FunctionImport Name="GetUniqueNumber" ReturnType="Edm.String" m:HttpMethod="GET"><Parameter Name="documentType" Type="Edm.Byte" Nullable="false" /><Parameter Name="dateOfIssue" Type="Edm.DateTime" Nullable="false" /></FunctionImport><FunctionImport Name="SendMailWithIssuedInvoice" ReturnType="Edm.Boolean" m:HttpMethod="GET"><Parameter Name="issuedInvoiceId" Type="Edm.Int32" Nullable="false" /></FunctionImport><AssociationSet Name="FK_Agenda_ConstantSymbol" Association="DokladModel.FK_Agenda_ConstantSymbol"><End Role="Agenda" EntitySet="Agendas" /><End Role="ConstantSymbol" EntitySet="ConstantSymbols" /></AssociationSet><AssociationSet Name="FK_Agenda_Currency" Association="DokladModel.FK_Agenda_Currency"><End Role="Agenda" EntitySet="Agendas" /><End Role="Currency" EntitySet="Currencies" /></AssociationSet><AssociationSet Name="FK_Agenda_PaymentOption" Association="DokladModel.FK_Agenda_PaymentOption"><End Role="Agenda" EntitySet="Agendas" /><End Role="PaymentOption" EntitySet="PaymentOptions" /></AssociationSet><AssociationSet Name="FK_BankAccount_Agenda" Association="DokladModel.FK_BankAccount_Agenda"><End Role="Agenda" EntitySet="Agendas" /><End Role="BankAccount" EntitySet="BankAccounts" /></AssociationSet><AssociationSet Name="FK_DocumentAddress_Agenda" Association="DokladModel.FK_DocumentAddress_Agenda"><End Role="Agenda" EntitySet="Agendas" /><End Role="DocumentAddress" EntitySet="DocumentAddresses" /></AssociationSet><AssociationSet Name="FK_Event_Agenda" Association="DokladModel.FK_Event_Agenda"><End Role="Agenda" EntitySet="Agendas" /><End Role="Event" EntitySet="Events" /></AssociationSet><AssociationSet Name="FK_IssuedInvoice_Agenda" Association="DokladModel.FK_IssuedInvoice_Agenda"><End Role="Agenda" EntitySet="Agendas" /><End Role="IssuedInvoice" EntitySet="IssuedInvoices" /></AssociationSet><AssociationSet Name="FK_IssuedInvoiceItem_Agenda" Association="DokladModel.FK_IssuedInvoiceItem_Agenda"><End Role="Agenda" EntitySet="Agendas" /><End Role="IssuedInvoiceItem" EntitySet="IssuedInvoiceItems" /></AssociationSet><AssociationSet Name="FK_PriceListItem_Agenda" Association="DokladModel.FK_PriceListItem_Agenda"><End Role="Agenda" EntitySet="Agendas" /><End Role="PriceListItem" EntitySet="PriceListItems" /></AssociationSet><AssociationSet Name="FK_Agenda_Contact" Association="DokladModel.AgendaContact"><End Role="Agenda" EntitySet="Agendas" /><End Role="Contact" EntitySet="Contacts" /></AssociationSet><AssociationSet Name="FK_Agenda_CashVoucherDefaultReportColor" Association="DokladModel.FK_Agenda_CashVoucherDefaultReportColor"><End Role="Agenda" EntitySet="Agendas" /><End Role="ReportColor" EntitySet="ReportColors" /></AssociationSet><AssociationSet Name="FK_Agenda_CashVoucherDefaultReportColorHc" Association="DokladModel.FK_Agenda_CashVoucherDefaultReportColorHc"><End Role="Agenda" EntitySet="Agendas" /><End Role="ReportColor" EntitySet="ReportColors" /></AssociationSet><AssociationSet Name="FK_Agenda_DefaultReportColor" Association="DokladModel.FK_Agenda_DefaultReportColor"><End Role="Agenda" EntitySet="Agendas" /><End Role="ReportColor" EntitySet="ReportColors" /></AssociationSet><AssociationSet Name="FK_Agenda_DefaultReportColorHc" Association="DokladModel.FK_Agenda_DefaultReportColorHc"><End Role="Agenda" EntitySet="Agendas" /><End Role="ReportColor" EntitySet="ReportColors" /></AssociationSet><AssociationSet Name="FK_Agenda_ProformaDefaultReportColor" Association="DokladModel.FK_Agenda_ProformaDefaultReportColor"><End Role="Agenda" EntitySet="Agendas" /><End Role="ReportColor" EntitySet="ReportColors" /></AssociationSet><AssociationSet Name="FK_Agenda_ProformaDefaultReportColorHc" Association="DokladModel.FK_Agenda_ProformaDefaultReportColorHc"><End Role="Agenda" EntitySet="Agendas" /><End Role="ReportColor" EntitySet="ReportColors" /></AssociationSet><AssociationSet Name="FK_ReportColor_Agenda" Association="DokladModel.FK_ReportColor_Agenda"><End Role="Agenda" EntitySet="Agendas" /><End Role="ReportColor" EntitySet="ReportColors" /></AssociationSet><AssociationSet Name="FK_Bank_Country" Association="DokladModel.FK_Bank_Country"><End Role="Bank" EntitySet="Banks" /><End Role="Country" EntitySet="Countries" /></AssociationSet><AssociationSet Name="FK_BankAccount_Bank" Association="DokladModel.FK_BankAccount_Bank"><End Role="Bank" EntitySet="Banks" /><End Role="BankAccount" EntitySet="BankAccounts" /></AssociationSet><AssociationSet Name="FK_BankAccount_Contact" Association="DokladModel.FK_BankAccount_Contact"><End Role="BankAccount" EntitySet="BankAccounts" /><End Role="Contact" EntitySet="Contacts" /></AssociationSet><AssociationSet Name="FK_BankAccount_Currency" Association="DokladModel.FK_BankAccount_Currency"><End Role="BankAccount" EntitySet="BankAccounts" /><End Role="Currency" EntitySet="Currencies" /></AssociationSet><AssociationSet Name="FK_ConstantSymbol_Country" Association="DokladModel.FK_ConstantSymbol_Country"><End Role="ConstantSymbol" EntitySet="ConstantSymbols" /><End Role="Country" EntitySet="Countries" /></AssociationSet><AssociationSet Name="FK_IssuedInvoice_ConstantSymbol" Association="DokladModel.FK_IssuedInvoice_ConstantSymbol"><End Role="ConstantSymbol" EntitySet="ConstantSymbols" /><End Role="IssuedInvoice" EntitySet="IssuedInvoices" /></AssociationSet><AssociationSet Name="FK_Contact_Country" Association="DokladModel.FK_Contact_Country"><End Role="Contact" EntitySet="Contacts" /><End Role="Country" EntitySet="Countries" /></AssociationSet><AssociationSet Name="FK_IssuedInvoice_Contact" Association="DokladModel.FK_IssuedInvoice_Contact"><End Role="Contact" EntitySet="Contacts" /><End Role="IssuedInvoice" EntitySet="IssuedInvoices" /></AssociationSet><AssociationSet Name="FK_Country_Currency" Association="DokladModel.FK_Country_Currency"><End Role="Country" EntitySet="Countries" /><End Role="Currency" EntitySet="Currencies" /></AssociationSet><AssociationSet Name="FK_VatRate_Country" Association="DokladModel.FK_VatRate_Country"><End Role="Country" EntitySet="Countries" /><End Role="VatRate" EntitySet="VatRates" /></AssociationSet><AssociationSet Name="FK_Event_Country" Association="DokladModel.FK_Event_Country"><End Role="Country" EntitySet="Countries" /><End Role="Event" EntitySet="Events" /></AssociationSet><AssociationSet Name="FK_ExchangeRate_Currency" Association="DokladModel.FK_ExchangeRate_Currency"><End Role="Currency" EntitySet="Currencies" /><End Role="ExchangeRate" EntitySet="ExchangeRates" /></AssociationSet><AssociationSet Name="FK_IssuedInvoice_Currency" Association="DokladModel.FK_IssuedInvoice_Currency"><End Role="Currency" EntitySet="Currencies" /><End Role="IssuedInvoice" EntitySet="IssuedInvoices" /></AssociationSet><AssociationSet Name="FK_PriceListItem_Currency" Association="DokladModel.FK_PriceListItem_Currency"><End Role="Currency" EntitySet="Currencies" /><End Role="PriceListItem" EntitySet="PriceListItems" /></AssociationSet><AssociationSet Name="FK_MyCompanyDocumentAdrress_DocumentAddress" Association="DokladModel.FK_MyCompanyDocumentAdrress_DocumentAddress"><End Role="DocumentAddress" EntitySet="DocumentAddresses" /><End Role="IssuedInvoice" EntitySet="IssuedInvoices" /></AssociationSet><AssociationSet Name="FK_PurchaserDocumentAddress_DocumentAddress" Association="DokladModel.FK_PurchaserDocumentAddress_DocumentAddress"><End Role="DocumentAddress" EntitySet="DocumentAddresses" /><End Role="IssuedInvoice" EntitySet="IssuedInvoices" /></AssociationSet><AssociationSet Name="FK_Event_Category" Association="DokladModel.FK_Event_Category"><End Role="Event" EntitySet="Events" /><End Role="EventCategory" EntitySet="EventCategories" /></AssociationSet><AssociationSet Name="ExchangeListExchangeRate" Association="DokladModel.ExchangeListExchangeRate"><End Role="ExchangeList" EntitySet="ExchangeLists" /><End Role="ExchangeRate" EntitySet="ExchangeRates" /></AssociationSet><AssociationSet Name="FK_IssuedInvoice_AccountedByInvoice" Association="DokladModel.FK_IssuedInvoice_AccountedByInvoice"><End Role="IssuedInvoice" EntitySet="IssuedInvoices" /><End Role="IssuedInvoice1" EntitySet="IssuedInvoices" /></AssociationSet><AssociationSet Name="FK_IssuedInvoice_PaymentOption" Association="DokladModel.FK_IssuedInvoice_PaymentOption"><End Role="IssuedInvoice" EntitySet="IssuedInvoices" /><End Role="PaymentOption" EntitySet="PaymentOptions" /></AssociationSet><AssociationSet Name="FK_IssuedInvoiceItem_Invoice" Association="DokladModel.FK_IssuedInvoiceItem_Invoice"><End Role="IssuedInvoice" EntitySet="IssuedInvoices" /><End Role="IssuedInvoiceItem" EntitySet="IssuedInvoiceItems" /></AssociationSet><AssociationSet Name="FK_IssuedInvoice_CashVoucherReportColor" Association="DokladModel.FK_IssuedInvoice_CashVoucherReportColor"><End Role="IssuedInvoice" EntitySet="IssuedInvoices" /><End Role="ReportColor" EntitySet="ReportColors" /></AssociationSet><AssociationSet Name="FK_IssuedInvoice_ReportColor" Association="DokladModel.FK_IssuedInvoice_ReportColor"><End Role="IssuedInvoice" EntitySet="IssuedInvoices" /><End Role="ReportColor" EntitySet="ReportColors" /></AssociationSet><AssociationSet Name="FK_CreditNoteIssuedInvoice_IssuedInvoice" Association="DokladModel.FK_CreditNoteIssuedInvoice_IssuedInvoice"><End Role="IssuedInvoice" EntitySet="IssuedInvoices" /><End Role="IssuedInvoice1" EntitySet="IssuedInvoices" /></AssociationSet></EntityContainer></Schema></edmx:DataServices></edmx:Edmx>
|
@@ -0,0 +1,145 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<edmx:Edmx Version="4.0"
|
3
|
+
xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
|
4
|
+
<edmx:DataServices>
|
5
|
+
<Schema Namespace="ODataDemo"
|
6
|
+
xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
7
|
+
<EntityType Name="Product">
|
8
|
+
<Key>
|
9
|
+
<PropertyRef Name="ID" />
|
10
|
+
</Key>
|
11
|
+
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
12
|
+
<Property Name="Name" Type="Edm.String" />
|
13
|
+
<Property Name="Description" Type="Edm.String" />
|
14
|
+
<Property Name="ReleaseDate" Type="Edm.DateTimeOffset" Nullable="false" />
|
15
|
+
<Property Name="DiscontinuedDate" Type="Edm.DateTimeOffset" />
|
16
|
+
<Property Name="Rating" Type="Edm.Int16" Nullable="false" />
|
17
|
+
<Property Name="Price" Type="Edm.Double" Nullable="false" />
|
18
|
+
<NavigationProperty Name="Categories" Type="Collection(ODataDemo.Category)" Partner="Products" />
|
19
|
+
<NavigationProperty Name="Supplier" Type="ODataDemo.Supplier" Partner="Products" />
|
20
|
+
<NavigationProperty Name="ProductDetail" Type="ODataDemo.ProductDetail" Partner="Product" />
|
21
|
+
</EntityType>
|
22
|
+
<EntityType Name="FeaturedProduct" BaseType="ODataDemo.Product">
|
23
|
+
<NavigationProperty Name="Advertisement" Type="ODataDemo.Advertisement" Partner="FeaturedProduct" />
|
24
|
+
</EntityType>
|
25
|
+
<EntityType Name="ProductDetail">
|
26
|
+
<Key>
|
27
|
+
<PropertyRef Name="ProductID" />
|
28
|
+
</Key>
|
29
|
+
<Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
|
30
|
+
<Property Name="Details" Type="Edm.String" />
|
31
|
+
<NavigationProperty Name="Product" Type="ODataDemo.Product" Partner="ProductDetail" />
|
32
|
+
</EntityType>
|
33
|
+
<EntityType Name="Category" OpenType="true">
|
34
|
+
<Key>
|
35
|
+
<PropertyRef Name="ID" />
|
36
|
+
</Key>
|
37
|
+
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
38
|
+
<Property Name="Name" Type="Edm.String" />
|
39
|
+
<NavigationProperty Name="Products" Type="Collection(ODataDemo.Product)" Partner="Categories" />
|
40
|
+
</EntityType>
|
41
|
+
<EntityType Name="Supplier">
|
42
|
+
<Key>
|
43
|
+
<PropertyRef Name="ID" />
|
44
|
+
</Key>
|
45
|
+
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
46
|
+
<Property Name="Name" Type="Edm.String" />
|
47
|
+
<Property Name="Address" Type="ODataDemo.Address" />
|
48
|
+
<Property Name="Location" Type="Edm.GeographyPoint" SRID="Variable" />
|
49
|
+
<Property Name="Concurrency" Type="Edm.Int32" ConcurrencyMode="Fixed" Nullable="false" />
|
50
|
+
<NavigationProperty Name="Products" Type="Collection(ODataDemo.Product)" Partner="Supplier" />
|
51
|
+
</EntityType>
|
52
|
+
<ComplexType Name="Address">
|
53
|
+
<Property Name="Street" Type="Edm.String" />
|
54
|
+
<Property Name="City" Type="Edm.String" />
|
55
|
+
<Property Name="State" Type="Edm.String" />
|
56
|
+
<Property Name="ZipCode" Type="Edm.String" />
|
57
|
+
<Property Name="Country" Type="Edm.String" />
|
58
|
+
</ComplexType>
|
59
|
+
<EntityType Name="Person">
|
60
|
+
<Key>
|
61
|
+
<PropertyRef Name="ID" />
|
62
|
+
</Key>
|
63
|
+
<Property Name="ID" Type="Edm.Int32" Nullable="false" />
|
64
|
+
<Property Name="Name" Type="Edm.String" />
|
65
|
+
<NavigationProperty Name="PersonDetail" Type="ODataDemo.PersonDetail" Partner="Person" />
|
66
|
+
</EntityType>
|
67
|
+
<EntityType Name="Customer" BaseType="ODataDemo.Person">
|
68
|
+
<Property Name="TotalExpense" Type="Edm.Decimal" Nullable="false" />
|
69
|
+
</EntityType>
|
70
|
+
<EntityType Name="Employee" BaseType="ODataDemo.Person">
|
71
|
+
<Property Name="EmployeeID" Type="Edm.Int64" Nullable="false" />
|
72
|
+
<Property Name="HireDate" Type="Edm.DateTimeOffset" Nullable="false" />
|
73
|
+
<Property Name="Salary" Type="Edm.Single" Nullable="false" />
|
74
|
+
</EntityType>
|
75
|
+
<EntityType Name="PersonDetail">
|
76
|
+
<Key>
|
77
|
+
<PropertyRef Name="PersonID" />
|
78
|
+
</Key>
|
79
|
+
<Property Name="PersonID" Type="Edm.Int32" Nullable="false" />
|
80
|
+
<Property Name="Age" Type="Edm.Byte" Nullable="false" />
|
81
|
+
<Property Name="Gender" Type="Edm.Boolean" Nullable="false" />
|
82
|
+
<Property Name="Phone" Type="Edm.String" />
|
83
|
+
<Property Name="Address" Type="ODataDemo.Address" />
|
84
|
+
<Property Name="Photo" Type="Edm.Stream" Nullable="false" />
|
85
|
+
<NavigationProperty Name="Person" Type="ODataDemo.Person" Partner="PersonDetail" />
|
86
|
+
</EntityType>
|
87
|
+
<EntityType Name="Advertisement" HasStream="true">
|
88
|
+
<Key>
|
89
|
+
<PropertyRef Name="ID" />
|
90
|
+
</Key>
|
91
|
+
<Property Name="ID" Type="Edm.Guid" Nullable="false" />
|
92
|
+
<Property Name="Name" Type="Edm.String" />
|
93
|
+
<Property Name="AirDate" Type="Edm.DateTimeOffset" Nullable="false" />
|
94
|
+
<NavigationProperty Name="FeaturedProduct" Type="ODataDemo.FeaturedProduct" Partner="Advertisement" />
|
95
|
+
</EntityType>
|
96
|
+
<EntityContainer Name="DemoService">
|
97
|
+
<EntitySet Name="Products" EntityType="ODataDemo.Product">
|
98
|
+
<NavigationPropertyBinding Path="ODataDemo.FeaturedProduct/Advertisement" Target="Advertisements" />
|
99
|
+
<NavigationPropertyBinding Path="Categories" Target="Categories" />
|
100
|
+
<NavigationPropertyBinding Path="Supplier" Target="Suppliers" />
|
101
|
+
<NavigationPropertyBinding Path="ProductDetail" Target="ProductDetails" />
|
102
|
+
</EntitySet>
|
103
|
+
<EntitySet Name="ProductDetails" EntityType="ODataDemo.ProductDetail">
|
104
|
+
<NavigationPropertyBinding Path="Product" Target="Products" />
|
105
|
+
</EntitySet>
|
106
|
+
<EntitySet Name="Categories" EntityType="ODataDemo.Category">
|
107
|
+
<NavigationPropertyBinding Path="Products" Target="Products" />
|
108
|
+
</EntitySet>
|
109
|
+
<EntitySet Name="Suppliers" EntityType="ODataDemo.Supplier">
|
110
|
+
<NavigationPropertyBinding Path="Products" Target="Products" />
|
111
|
+
</EntitySet>
|
112
|
+
<EntitySet Name="Persons" EntityType="ODataDemo.Person">
|
113
|
+
<NavigationPropertyBinding Path="PersonDetail" Target="PersonDetails" />
|
114
|
+
</EntitySet>
|
115
|
+
<EntitySet Name="PersonDetails" EntityType="ODataDemo.PersonDetail">
|
116
|
+
<NavigationPropertyBinding Path="Person" Target="Persons" />
|
117
|
+
</EntitySet>
|
118
|
+
<EntitySet Name="Advertisements" EntityType="ODataDemo.Advertisement">
|
119
|
+
<NavigationPropertyBinding Path="FeaturedProduct" Target="Products" />
|
120
|
+
</EntitySet>
|
121
|
+
</EntityContainer>
|
122
|
+
<Annotations Target="ODataDemo.DemoService">
|
123
|
+
<Annotation Term="Org.OData.Display.V1.Description" String="This is a sample OData service with vocabularies" />
|
124
|
+
</Annotations>
|
125
|
+
<Annotations Target="ODataDemo.Product">
|
126
|
+
<Annotation Term="Org.OData.Display.V1.Description" String="All Products available in the online store" />
|
127
|
+
</Annotations>
|
128
|
+
<Annotations Target="ODataDemo.Product/Name">
|
129
|
+
<Annotation Term="Org.OData.Display.V1.DisplayName" String="Product Name" />
|
130
|
+
</Annotations>
|
131
|
+
<Annotations Target="ODataDemo.DemoService/Suppliers">
|
132
|
+
<Annotation Term="Org.OData.Publication.V1.PublisherName" String="Microsoft Corp." />
|
133
|
+
<Annotation Term="Org.OData.Publication.V1.PublisherId" String="MSFT" />
|
134
|
+
<Annotation Term="Org.OData.Publication.V1.Keywords" String="Inventory, Supplier, Advertisers, Sales, Finance" />
|
135
|
+
<Annotation Term="Org.OData.Publication.V1.AttributionUrl" String="http://www.odata.org/" />
|
136
|
+
<Annotation Term="Org.OData.Publication.V1.AttributionDescription" String="All rights reserved" />
|
137
|
+
<Annotation Term="Org.OData.Publication.V1.DocumentationUrl " String="http://www.odata.org/" />
|
138
|
+
<Annotation Term="Org.OData.Publication.V1.TermsOfUseUrl" String="All rights reserved" />
|
139
|
+
<Annotation Term="Org.OData.Publication.V1.PrivacyPolicyUrl" String="http://www.odata.org/" />
|
140
|
+
<Annotation Term="Org.OData.Publication.V1.LastModified" String="4/2/2013" />
|
141
|
+
<Annotation Term="Org.OData.Publication.V1.ImageUrl " String="http://www.odata.org/" />
|
142
|
+
</Annotations>
|
143
|
+
</Schema>
|
144
|
+
</edmx:DataServices>
|
145
|
+
</edmx:Edmx>
|
File without changes
|
@@ -1,10 +1,12 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
+
require 'base64'
|
2
3
|
|
3
4
|
module OData
|
5
|
+
|
4
6
|
describe Service do
|
5
7
|
before(:all) do
|
6
8
|
stub_request(:get, /http:\/\/test\.com\/test\.svc\/\$metadata(?:\?.+)?/).
|
7
|
-
with(:headers =>
|
9
|
+
with(:headers => DEFAULT_HEADERS).
|
8
10
|
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/sample_service/edmx_categories_products.xml", __FILE__)), :headers => {})
|
9
11
|
|
10
12
|
@cat_prod_service = OData::Service.new "http://test.com/test.svc"
|
@@ -171,7 +173,7 @@ module OData
|
|
171
173
|
end
|
172
174
|
it "should return true if a function import post that returns successfully and doesn't have a return value (HTTP 204)" do
|
173
175
|
result = subject.CleanDatabaseForTesting
|
174
|
-
result.
|
176
|
+
expect(result).to eq true
|
175
177
|
end
|
176
178
|
it "should return a collection of entities for a collection" do
|
177
179
|
result = subject.EntityCategoryWebGet
|
@@ -204,7 +206,7 @@ module OData
|
|
204
206
|
|
205
207
|
before(:all) do
|
206
208
|
stub_request(:get, "http://test.com/test.svc/$metadata").
|
207
|
-
with(:headers =>
|
209
|
+
with(:headers => DEFAULT_HEADERS).
|
208
210
|
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/int64_ids/edmx_car_service.xml", __FILE__)), :headers => {})
|
209
211
|
@svc = OData::Service.new "http://test.com/test.svc/"
|
210
212
|
end
|
@@ -218,7 +220,7 @@ module OData
|
|
218
220
|
|
219
221
|
its(:name) { should eq('id') }
|
220
222
|
its(:type) { should eq('Edm.Int64') }
|
221
|
-
its(:nullable) { should
|
223
|
+
its(:nullable) { should eq false }
|
222
224
|
its(:fc_target_path) { should be_nil }
|
223
225
|
its(:fc_keep_in_content) { should be_nil }
|
224
226
|
end
|
@@ -226,7 +228,7 @@ module OData
|
|
226
228
|
context "can parse Id correctly" do
|
227
229
|
before(:each) do
|
228
230
|
stub_request(:get, "http://test.com/test.svc/Cars(213L)").
|
229
|
-
with(:headers =>
|
231
|
+
with(:headers => DEFAULT_HEADERS).
|
230
232
|
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/int64_ids/result_cars.xml", __FILE__)), :headers => {})
|
231
233
|
|
232
234
|
@svc.Cars(213)
|
@@ -245,7 +247,7 @@ module OData
|
|
245
247
|
|
246
248
|
before(:all) do
|
247
249
|
stub_request(:get, "http://test.com/test.svc/$metadata").
|
248
|
-
with(:headers =>
|
250
|
+
with(:headers => DEFAULT_HEADERS).
|
249
251
|
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/int64_ids/edmx_boat_service.xml", __FILE__)), :headers => {})
|
250
252
|
@svc = OData::Service.new "http://test.com/test.svc/"
|
251
253
|
end
|
@@ -259,7 +261,7 @@ module OData
|
|
259
261
|
|
260
262
|
its(:name) { should eq('KeyId') }
|
261
263
|
its(:type) { should eq('Edm.Int64') }
|
262
|
-
its(:nullable) { should
|
264
|
+
its(:nullable) { should eq(false) }
|
263
265
|
its(:fc_target_path) { should be_nil }
|
264
266
|
its(:fc_keep_in_content) { should be_nil }
|
265
267
|
end
|
@@ -267,7 +269,7 @@ module OData
|
|
267
269
|
context "can parse Id correctly" do
|
268
270
|
before(:each) do
|
269
271
|
stub_request(:get, "http://test.com/test.svc/Boats(213L)").
|
270
|
-
with(:headers =>
|
272
|
+
with(:headers => DEFAULT_HEADERS).
|
271
273
|
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/int64_ids/result_boats.xml", __FILE__)), :headers => {})
|
272
274
|
|
273
275
|
@svc.Boats(213)
|
@@ -285,10 +287,13 @@ module OData
|
|
285
287
|
|
286
288
|
describe "Dual Namespaces" do
|
287
289
|
before(:all) do
|
288
|
-
|
289
|
-
|
290
|
+
auth_string = "xxxx\\yyyy:zzzz"
|
291
|
+
authorization_header = { authorization: "Basic #{Base64::encode64(auth_string).strip}" }
|
292
|
+
stub_request(:get, "http://test.com/test.svc/$metadata").
|
293
|
+
with(:headers => DEFAULT_HEADERS.merge(authorization_header)).
|
290
294
|
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/ms_system_center/edmx_ms_system_center_v2.xml", __FILE__)), :headers => {})
|
291
295
|
end
|
296
|
+
|
292
297
|
after(:all) do
|
293
298
|
VMM.constants.each do |constant|
|
294
299
|
VMM.send :remove_const, constant
|
@@ -299,4 +304,4 @@ module OData
|
|
299
304
|
lambda { OData::Service.new "http://test.com/test.svc/", { :username => "xxxx\\yyyy", :password=> "zzzz", :verify_ssl => false, :namespace => "VMM" } }.should_not raise_error
|
300
305
|
end
|
301
306
|
end
|
302
|
-
end
|
307
|
+
end
|
data/spec/service_spec.rb
CHANGED
@@ -6,16 +6,16 @@ module OData
|
|
6
6
|
it "truncates passed in end slash from uri when making the request" do
|
7
7
|
# Required for the build_classes method
|
8
8
|
stub_request(:get, "http://test.com/test.svc/$metadata").
|
9
|
-
|
10
|
-
|
9
|
+
with(:headers => DEFAULT_HEADERS).
|
10
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/edmx_empty.xml", __FILE__)), :headers => {})
|
11
11
|
|
12
12
|
svc = OData::Service.new "http://test.com/test.svc/"
|
13
13
|
end
|
14
14
|
it "doesn't error with lowercase entities" do
|
15
15
|
# Required for the build_classes method
|
16
16
|
stub_request(:get, "http://test.com/test.svc/$metadata").
|
17
|
-
|
18
|
-
|
17
|
+
with(:headers => DEFAULT_HEADERS).
|
18
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/edmx_lowercase.xml", __FILE__)), :headers => {})
|
19
19
|
|
20
20
|
lambda { OData::Service.new "http://test.com/test.svc" }.should_not raise_error
|
21
21
|
end
|
@@ -24,8 +24,8 @@ module OData
|
|
24
24
|
before(:each) do
|
25
25
|
# Required for the build_classes method
|
26
26
|
stub_request(:get, /http:\/\/test\.com\/test\.svc\/\$metadata(?:\?.+)?/).
|
27
|
-
|
28
|
-
|
27
|
+
with(:headers => DEFAULT_HEADERS).
|
28
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/edmx_empty.xml", __FILE__)), :headers => {})
|
29
29
|
end
|
30
30
|
it "should accept additional query string parameters" do
|
31
31
|
svc = OData::Service.new "http://test.com/test.svc/", { :additional_params => { :x=>1, :y=>2 } }
|
@@ -41,8 +41,8 @@ module OData
|
|
41
41
|
before(:each) do
|
42
42
|
# Required for the build_classes method
|
43
43
|
stub_request(:get, /http:\/\/test\.com\/test\.svc\/\$metadata(?:\?.+)?/).
|
44
|
-
|
45
|
-
|
44
|
+
with(:headers => DEFAULT_HEADERS).
|
45
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/edmx_empty.xml", __FILE__)), :headers => {})
|
46
46
|
end
|
47
47
|
it "should accept in options that will be passed to the rest-client lib" do
|
48
48
|
svc = OData::Service.new "http://test.com/test.svc/", { :rest_options => { :ssl_ca_file => "ca_certificate.pem" } }
|
@@ -58,8 +58,8 @@ module OData
|
|
58
58
|
before(:each) do
|
59
59
|
# Required for the build_classes method
|
60
60
|
stub_request(:any, /http:\/\/test\.com\/test\.svc(?:.*)/).
|
61
|
-
|
62
|
-
|
61
|
+
with(:headers => DEFAULT_HEADERS).
|
62
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/sap/edmx_sap_demo_flight.xml", __FILE__)), :headers => {})
|
63
63
|
end
|
64
64
|
it "should pass the parameters as part of a query" do
|
65
65
|
svc = OData::Service.new "http://test.com/test.svc/", { :additional_params => { :x=>1, :y=>2 } }
|
@@ -124,12 +124,12 @@ module OData
|
|
124
124
|
describe "exception handling" do
|
125
125
|
before(:each) do
|
126
126
|
stub_request(:get, "http://test.com/test.svc/$metadata").
|
127
|
-
|
128
|
-
|
127
|
+
with(:headers => DEFAULT_HEADERS).
|
128
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/sample_service/edmx_categories_products.xml", __FILE__)), :headers => {})
|
129
129
|
|
130
130
|
stub_request(:get, "http://test.com/test.svc/Categories?$select=Price").
|
131
|
-
|
132
|
-
|
131
|
+
with(:headers => DEFAULT_HEADERS).
|
132
|
+
to_return(:status => 400, :body => File.new(File.expand_path("../fixtures/error_without_message.xml", __FILE__)), :headers => {})
|
133
133
|
end
|
134
134
|
|
135
135
|
it "includes a generic message if the error is not in the response" do
|
@@ -146,13 +146,13 @@ module OData
|
|
146
146
|
before(:each) do
|
147
147
|
# Required for the build_classes method
|
148
148
|
stub_request(:get, "http://test.com/test.svc/$metadata").
|
149
|
-
|
150
|
-
|
149
|
+
with(:headers => DEFAULT_HEADERS).
|
150
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/edmx_lowercase.xml", __FILE__)), :headers => {})
|
151
151
|
end
|
152
152
|
|
153
153
|
it "should respond_to a lowercase collection" do
|
154
154
|
svc = OData::Service.new "http://test.com/test.svc"
|
155
|
-
svc.respond_to?('acronyms').
|
155
|
+
expect(svc.respond_to?('acronyms')).to eq true
|
156
156
|
end
|
157
157
|
|
158
158
|
it "should allow a lowercase collections to be queried" do
|
@@ -165,12 +165,12 @@ module OData
|
|
165
165
|
before(:each) do
|
166
166
|
# Required for the build_classes method
|
167
167
|
stub_request(:get, "http://test.com/test.svc/$metadata").
|
168
|
-
|
169
|
-
|
168
|
+
with(:headers => DEFAULT_HEADERS).
|
169
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/sap/edmx_sap_demo_flight.xml", __FILE__)), :headers => {})
|
170
170
|
|
171
171
|
stub_request(:get, "http://test.com/test.svc/z_demo_flightCollection").
|
172
|
-
|
173
|
-
|
172
|
+
with(:headers => DEFAULT_HEADERS).
|
173
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/sap/result_sap_demo_flight_missing_category.xml", __FILE__)), :headers => {})
|
174
174
|
end
|
175
175
|
|
176
176
|
it "should handle entities without a category element" do
|
@@ -185,18 +185,18 @@ module OData
|
|
185
185
|
before(:each) do
|
186
186
|
# Metadata
|
187
187
|
stub_request(:get, "http://test.com/test.svc/$metadata").
|
188
|
-
|
189
|
-
|
188
|
+
with(:headers => DEFAULT_HEADERS).
|
189
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/feed_customization/edmx_feed_customization.xml", __FILE__)), :headers => {})
|
190
190
|
|
191
191
|
# Content - Products
|
192
192
|
stub_request(:get, /http:\/\/test\.com\/test\.svc\/Products(?:.*)/).
|
193
|
-
|
194
|
-
|
193
|
+
with(:headers => DEFAULT_HEADERS).
|
194
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/feed_customization/result_feed_customization_products_expand.xml", __FILE__)), :headers => {})
|
195
195
|
|
196
196
|
# Content - Categories expanded Products
|
197
197
|
stub_request(:get, /http:\/\/test\.com\/test\.svc\/Categories(?:.*)/).
|
198
|
-
|
199
|
-
|
198
|
+
with(:headers => DEFAULT_HEADERS).
|
199
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/feed_customization/result_feed_customization_categories_expand.xml", __FILE__)), :headers => {})
|
200
200
|
end
|
201
201
|
after(:each) do
|
202
202
|
Object.send(:remove_const, 'Product')
|
@@ -314,13 +314,13 @@ module OData
|
|
314
314
|
before(:each) do
|
315
315
|
# Metadata
|
316
316
|
stub_request(:get, "http://test.com/test.svc/$metadata").
|
317
|
-
|
318
|
-
|
317
|
+
with(:headers => DEFAULT_HEADERS).
|
318
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/inheritance/edmx_pluralsight.xml", __FILE__)), :headers => {})
|
319
319
|
|
320
320
|
# Content - Courses
|
321
321
|
stub_request(:get, /http:\/\/test\.com\/test\.svc\/Courses(?:.*)/).
|
322
|
-
|
323
|
-
|
322
|
+
with(:headers => DEFAULT_HEADERS).
|
323
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/inheritance/result_pluralsight_courses.xml", __FILE__)), :headers => {})
|
324
324
|
end
|
325
325
|
|
326
326
|
it "should build all inherited attributes" do
|
@@ -362,21 +362,21 @@ module OData
|
|
362
362
|
before(:each) do
|
363
363
|
# Metadata
|
364
364
|
stub_request(:get, "http://test.com/test.svc/$metadata").
|
365
|
-
|
366
|
-
|
365
|
+
with(:headers => DEFAULT_HEADERS).
|
366
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/partial/partial_feed_metadata.xml", __FILE__)), :headers => {})
|
367
367
|
|
368
368
|
# Content - Partial
|
369
369
|
stub_request(:get, "http://test.com/test.svc/Partials").
|
370
|
-
|
371
|
-
|
370
|
+
with(:headers => DEFAULT_HEADERS).
|
371
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/partial/partial_feed_part_1.xml", __FILE__)), :headers => {})
|
372
372
|
|
373
373
|
stub_request(:get, "http://test.com/test.svc/Partials?$skiptoken='ERNSH'").
|
374
|
-
|
375
|
-
|
374
|
+
with(:headers => DEFAULT_HEADERS).
|
375
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/partial/partial_feed_part_2.xml", __FILE__)), :headers => {})
|
376
376
|
|
377
377
|
stub_request(:get, "http://test.com/test.svc/Partials?$skiptoken='ERNSH2'").
|
378
|
-
|
379
|
-
|
378
|
+
with(:headers => DEFAULT_HEADERS).
|
379
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/partial/partial_feed_part_3.xml", __FILE__)), :headers => {})
|
380
380
|
|
381
381
|
end
|
382
382
|
|
@@ -402,15 +402,15 @@ module OData
|
|
402
402
|
context "with additional_params" do
|
403
403
|
before(:each) do
|
404
404
|
stub_request(:get, "http://test.com/test.svc/$metadata?extra_param=value").
|
405
|
-
|
406
|
-
|
405
|
+
with(:headers => DEFAULT_HEADERS).
|
406
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/partial/partial_feed_metadata.xml", __FILE__)), :headers => {})
|
407
407
|
|
408
408
|
stub_request(:get, "http://test.com/test.svc/Partials?extra_param=value").
|
409
|
-
with(:headers =>
|
409
|
+
with(:headers => DEFAULT_HEADERS).
|
410
410
|
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/partial/partial_feed_part_1.xml", __FILE__)), :headers => {})
|
411
411
|
|
412
412
|
stub_request(:get, "http://test.com/test.svc/Partials?$skiptoken='ERNSH'&extra_param=value").
|
413
|
-
with(:headers =>
|
413
|
+
with(:headers => DEFAULT_HEADERS).
|
414
414
|
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/partial/partial_feed_part_2.xml", __FILE__)), :headers => {})
|
415
415
|
end
|
416
416
|
|
@@ -429,12 +429,12 @@ module OData
|
|
429
429
|
before(:each) do
|
430
430
|
# Required for the build_classes method
|
431
431
|
stub_request(:get, /http:\/\/test\.com\/test\.svc\/\$metadata(?:\?.+)?/).
|
432
|
-
|
433
|
-
|
432
|
+
with(:headers => DEFAULT_HEADERS).
|
433
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/sample_service/edmx_categories_products.xml", __FILE__)), :headers => {})
|
434
434
|
|
435
435
|
stub_request(:get, "http://test.com/test.svc/Categories(1)/$links/Products").
|
436
|
-
|
437
|
-
|
436
|
+
with(:headers => DEFAULT_HEADERS).
|
437
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/links/result_links_query.xml", __FILE__)), :headers => {})
|
438
438
|
end
|
439
439
|
it "should be able to parse the results of a links query" do
|
440
440
|
svc = OData::Service.new "http://test.com/test.svc/"
|
@@ -452,28 +452,28 @@ module OData
|
|
452
452
|
before(:each) do
|
453
453
|
# Required for the build_classes method
|
454
454
|
stub_request(:get, /http:\/\/test\.com\/test\.svc\/\$metadata(?:\?.+)?/).
|
455
|
-
|
456
|
-
|
455
|
+
with(:headers => DEFAULT_HEADERS).
|
456
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/sample_service/edmx_categories_products.xml", __FILE__)), :headers => {})
|
457
457
|
|
458
458
|
stub_request(:get, /http:\/\/test\.com\/test\.svc\/Products\(\d\)/).
|
459
|
-
|
460
|
-
|
459
|
+
with(:headers => DEFAULT_HEADERS).
|
460
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/sample_service/result_single_product.xml", __FILE__)), :headers => {})
|
461
461
|
|
462
462
|
stub_request(:get, /http:\/\/test\.com\/test\.svc\/Products\(\d{2,}\)/).
|
463
|
-
|
464
|
-
|
463
|
+
with(:headers => DEFAULT_HEADERS).
|
464
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/sample_service/result_single_product_not_found.xml", __FILE__)), :headers => {})
|
465
465
|
|
466
466
|
stub_request(:get, "http://test.com/test.svc/Products(1)/Category").
|
467
|
-
|
468
|
-
|
467
|
+
with(:headers => DEFAULT_HEADERS).
|
468
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/sample_service/result_single_category.xml", __FILE__)), :headers => {})
|
469
469
|
|
470
470
|
stub_request(:get, "http://test.com/test.svc/Categories(1)").
|
471
|
-
|
472
|
-
|
471
|
+
with(:headers => DEFAULT_HEADERS).
|
472
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/sample_service/result_single_category.xml", __FILE__)), :headers => {})
|
473
473
|
|
474
474
|
stub_request(:get, "http://test.com/test.svc/Categories(1)/Products").
|
475
|
-
|
476
|
-
|
475
|
+
with(:headers => DEFAULT_HEADERS).
|
476
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/sample_service/result_multiple_category_products.xml", __FILE__)), :headers => {})
|
477
477
|
|
478
478
|
stub_request(:post, "http://test.com/test.svc/Categories(1)/$links/Products").to_return(:status => 204)
|
479
479
|
stub_request(:post, "http://test.com/test.svc/$batch").to_return(:status => 202)
|
@@ -574,27 +574,27 @@ module OData
|
|
574
574
|
it "should have full metadata for a property returned from the properties method" do
|
575
575
|
svc = OData::Service.new "http://test.com/test.svc/"
|
576
576
|
Product.properties['Category'].should be_a PropertyMetadata
|
577
|
-
Product.properties['Category'].nav_prop.
|
577
|
+
expect(Product.properties['Category'].nav_prop).to eq true
|
578
578
|
end
|
579
579
|
|
580
580
|
it "should create objects that expose an id property" do
|
581
581
|
svc = OData::Service.new "http://test.com/test.svc/"
|
582
582
|
svc.Products(1)
|
583
583
|
product = svc.execute.first
|
584
|
-
product.
|
584
|
+
expect(product).to respond_to :id
|
585
585
|
end
|
586
586
|
|
587
587
|
it "should extract the id from the metadata" do
|
588
588
|
svc = OData::Service.new "http://test.com/test.svc/"
|
589
589
|
svc.Products(1)
|
590
590
|
product = svc.execute.first
|
591
|
-
product.id.
|
591
|
+
expect(product.id).to eq 1
|
592
592
|
end
|
593
593
|
|
594
594
|
describe "Class.first method" do
|
595
595
|
it "should exist on the create server objects" do
|
596
596
|
svc = OData::Service.new "http://test.com/test.svc/"
|
597
|
-
Product.
|
597
|
+
expect(Product).to respond_to :first
|
598
598
|
end
|
599
599
|
it "should return nil if an id isn't passed in" do
|
600
600
|
svc = OData::Service.new "http://test.com/test.svc/"
|
@@ -626,14 +626,14 @@ module OData
|
|
626
626
|
|
627
627
|
it "should create models in the specified namespace if the option is set (using a .NET style namespace with dots)" do
|
628
628
|
svc = OData::Service.new "http://test.com/test.svc/", { :namespace => 'VisoftInc.Sample.Models' }
|
629
|
-
defined?(VisoftInc::Sample::Models::Product).nil
|
630
|
-
defined?(VisoftInc::Sample::Models::Category).nil
|
629
|
+
expect(defined?(VisoftInc::Sample::Models::Product).nil?).to eq false
|
630
|
+
expect(defined?(VisoftInc::Sample::Models::Category).nil?).to eq false
|
631
631
|
end
|
632
632
|
|
633
633
|
it "should create models in the specified namespace if the option is set (using Ruby style namespaces with double colons)" do
|
634
634
|
svc = OData::Service.new "http://test.com/test.svc/", { :namespace => 'VisoftInc::Sample::Models' }
|
635
|
-
defined?(VisoftInc::Sample::Models::Product).nil?.should
|
636
|
-
defined?(VisoftInc::Sample::Models::Category).nil?.should
|
635
|
+
defined?(VisoftInc::Sample::Models::Product).nil?.should eq false
|
636
|
+
defined?(VisoftInc::Sample::Models::Category).nil?.should eq false
|
637
637
|
end
|
638
638
|
|
639
639
|
it "should fill object defined in a namespace" do
|
@@ -721,7 +721,7 @@ module OData
|
|
721
721
|
svc.save_changes
|
722
722
|
a_request(:post, "http://test.com/test.svc/Categories(1)/$links/Products").
|
723
723
|
with(:body => { "uri" => "http://test.com/test.svc/Products(1)" },
|
724
|
-
:headers => {'Content-Type' => 'application/json'}).should have_been_made
|
724
|
+
:headers => DEFAULT_HEADERS.merge({'Content-Type' => 'application/json'})).should have_been_made
|
725
725
|
end
|
726
726
|
|
727
727
|
it "should add the child to the parent's navigation property on a single_save" do
|
@@ -774,20 +774,47 @@ module OData
|
|
774
774
|
it { should eq @category }
|
775
775
|
end
|
776
776
|
end
|
777
|
+
|
778
|
+
describe "serializes nested collections" do
|
779
|
+
# Compy with oData Deep Insert capabilities
|
780
|
+
# http://docs.oasis-open.org/odata/odata-json-format/v4.0/os/odata-json-format-v4.0-os.html#_Toc372793073
|
781
|
+
|
782
|
+
before :each do
|
783
|
+
category = Category.new
|
784
|
+
category.Products = [Product.new(Name: "First"), Product.new(Name: "Last")]
|
785
|
+
@json = JSON.parse(category.to_json(type: :add))
|
786
|
+
end
|
787
|
+
|
788
|
+
it "should have an array for the Products key" do
|
789
|
+
@json["Products"].should be_a_kind_of Array
|
790
|
+
end
|
791
|
+
|
792
|
+
it "should have a hash for each product" do
|
793
|
+
@json["Products"].each{|x| x.should be_a_kind_of Hash}
|
794
|
+
end
|
795
|
+
|
796
|
+
it "should have the same data we put into the products" do
|
797
|
+
@json["Products"].first["Name"].should eq "First"
|
798
|
+
@json["Products"].last["Name"].should eq "Last"
|
799
|
+
end
|
800
|
+
end
|
777
801
|
end
|
778
802
|
end
|
779
803
|
|
780
804
|
describe "JSON serialization of objects" do
|
805
|
+
let(:username) { "blabla" }
|
806
|
+
let(:password) { "" }
|
807
|
+
|
781
808
|
before(:each) do
|
782
809
|
# Required for the build_classes method
|
783
|
-
stub_request(:get, "http://
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
stub_request(:get, "http://
|
788
|
-
|
789
|
-
|
790
|
-
svc = OData::Service.new "http://test.com/test.svc/", { :username =>
|
810
|
+
stub_request(:get, "http://test.com/test.svc/$metadata").
|
811
|
+
with(:headers => DEFAULT_HEADERS).
|
812
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/ms_system_center/edmx_ms_system_center.xml", __FILE__)), :headers => {})
|
813
|
+
|
814
|
+
stub_request(:get, "http://test.com/test.svc/VirtualMachines").
|
815
|
+
with(:headers => DEFAULT_HEADERS).
|
816
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/ms_system_center/virtual_machines.xml", __FILE__)), :headers => {})
|
817
|
+
svc = OData::Service.new "http://test.com/test.svc/", { :username => username, :password => password, :verify_ssl => false, :namespace => "VMM" }
|
791
818
|
svc.VirtualMachines
|
792
819
|
results = svc.execute
|
793
820
|
@json = results.first.as_json
|
@@ -810,23 +837,30 @@ module OData
|
|
810
837
|
end
|
811
838
|
|
812
839
|
describe "handling of Microsoft System Center 2012" do
|
840
|
+
let(:username) { "blabla" }
|
841
|
+
let(:password) { "" }
|
842
|
+
|
813
843
|
before(:each) do
|
844
|
+
auth_string = "#{username}:#{password}"
|
845
|
+
authorization_header = { authorization: "Basic #{Base64::encode64(auth_string).strip}" }
|
846
|
+
headers = DEFAULT_HEADERS.merge(authorization_header)
|
847
|
+
|
814
848
|
# Required for the build_classes method
|
815
|
-
stub_request(:get, "http://
|
816
|
-
|
817
|
-
|
849
|
+
stub_request(:get, "http://test.com/test.svc/$metadata").
|
850
|
+
with(:headers => headers).
|
851
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/ms_system_center/edmx_ms_system_center.xml", __FILE__)), :headers => {})
|
818
852
|
|
819
|
-
stub_request(:get, "http://
|
820
|
-
|
821
|
-
|
853
|
+
stub_request(:get, "http://test.com/test.svc/VirtualMachines").
|
854
|
+
with(:headers => headers).
|
855
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/ms_system_center/virtual_machines.xml", __FILE__)), :headers => {})
|
822
856
|
|
823
|
-
stub_request(:get, "http://
|
824
|
-
|
825
|
-
|
857
|
+
stub_request(:get, "http://test.com/test.svc/HardwareProfiles?$filter=Memory%20eq%203500").
|
858
|
+
with(:headers => headers).
|
859
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/ms_system_center/hardware_profiles.xml", __FILE__)), :headers => {})
|
826
860
|
|
827
|
-
stub_request(:get, "http://
|
828
|
-
|
829
|
-
|
861
|
+
stub_request(:get, "http://test.com/test.svc/VMTemplates").
|
862
|
+
with(:headers => headers).
|
863
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/ms_system_center/vm_templates.xml", __FILE__)), :headers => {})
|
830
864
|
end
|
831
865
|
|
832
866
|
after(:all) do
|
@@ -836,7 +870,7 @@ module OData
|
|
836
870
|
end
|
837
871
|
|
838
872
|
it "should successfully parse null valued string properties" do
|
839
|
-
svc = OData::Service.new "http://test.com/test.svc/", { :username =>
|
873
|
+
svc = OData::Service.new "http://test.com/test.svc/", { :username => username, :password => password, :verify_ssl => false, :namespace => "VMM" }
|
840
874
|
svc.VirtualMachines
|
841
875
|
results = svc.execute
|
842
876
|
results.first.should be_a_kind_of(VMM::VirtualMachine)
|
@@ -844,21 +878,21 @@ module OData
|
|
844
878
|
end
|
845
879
|
|
846
880
|
it "should successfully return a virtual machine" do
|
847
|
-
svc = OData::Service.new "http://test.com/test.svc/", { :username =>
|
881
|
+
svc = OData::Service.new "http://test.com/test.svc/", { :username => username, :password => password, :verify_ssl => false, :namespace => "VMM" }
|
848
882
|
svc.VirtualMachines
|
849
883
|
results = svc.execute
|
850
884
|
results.first.should be_a_kind_of(VMM::VirtualMachine)
|
851
885
|
end
|
852
886
|
|
853
887
|
it "should successfully return a hardware profile for results that include a collection of complex types" do
|
854
|
-
svc = OData::Service.new "http://test.com/test.svc/", { :username =>
|
888
|
+
svc = OData::Service.new "http://test.com/test.svc/", { :username => username, :password => password, :verify_ssl => false, :namespace => "VMM" }
|
855
889
|
svc.HardwareProfiles.filter("Memory eq 3500")
|
856
890
|
results = svc.execute
|
857
891
|
results.first.should be_a_kind_of(VMM::HardwareProfile)
|
858
892
|
end
|
859
893
|
|
860
894
|
it "should successfully return a collection of complex types" do
|
861
|
-
svc = OData::Service.new "http://test.com/test.svc/", { :username =>
|
895
|
+
svc = OData::Service.new "http://test.com/test.svc/", { :username => username, :password => password, :verify_ssl => false, :namespace => "VMM" }
|
862
896
|
svc.HardwareProfiles.filter("Memory eq 3500")
|
863
897
|
results = svc.execute
|
864
898
|
granted_list = results.first.GrantedToList
|
@@ -869,14 +903,14 @@ module OData
|
|
869
903
|
|
870
904
|
|
871
905
|
it "should successfully return results that include a collection of Edm types" do
|
872
|
-
svc = OData::Service.new "http://test.com/test.svc/", { :username =>
|
906
|
+
svc = OData::Service.new "http://test.com/test.svc/", { :username => username, :password => password, :verify_ssl => false, :namespace => "VMM" }
|
873
907
|
svc.VMTemplates
|
874
908
|
results = svc.execute
|
875
909
|
results.first.should be_a_kind_of(VMM::VMTemplate)
|
876
910
|
end
|
877
911
|
|
878
912
|
it "should successfully return a collection of Edm types" do
|
879
|
-
svc = OData::Service.new "http://test.com/test.svc/", { :username =>
|
913
|
+
svc = OData::Service.new "http://test.com/test.svc/", { :username => username, :password => password, :verify_ssl => false, :namespace => "VMM" }
|
880
914
|
svc.VMTemplates
|
881
915
|
results = svc.execute
|
882
916
|
boot_order = results.first.BootOrder
|
@@ -889,12 +923,12 @@ module OData
|
|
889
923
|
describe "handling of nested expands" do
|
890
924
|
before(:each) do
|
891
925
|
stub_request(:get, "http://test.com/test.svc/$metadata").
|
892
|
-
|
893
|
-
|
926
|
+
with(:headers => DEFAULT_HEADERS).
|
927
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/nested_expands/edmx_northwind.xml", __FILE__)), :headers => {})
|
894
928
|
|
895
929
|
stub_request(:get, "http://test.com/test.svc/Products?$expand=Category,Category/Products&$top=2").
|
896
|
-
|
897
|
-
|
930
|
+
with(:headers => DEFAULT_HEADERS).
|
931
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/nested_expands/northwind_products_category_expands.xml", __FILE__)), :headers => {})
|
898
932
|
end
|
899
933
|
|
900
934
|
it "should successfully parse the results" do
|
@@ -937,12 +971,12 @@ module OData
|
|
937
971
|
context "when results are found" do
|
938
972
|
before(:each) do
|
939
973
|
stub_request(:get, "http://test.com/test.svc/$metadata").
|
940
|
-
|
941
|
-
|
974
|
+
with(:headers => DEFAULT_HEADERS).
|
975
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/sample_service/edmx_categories_products.xml", __FILE__)), :headers => {})
|
942
976
|
|
943
977
|
stub_request(:get, "http://test.com/test.svc/Products?$select=Name,Price").
|
944
|
-
|
945
|
-
|
978
|
+
with(:headers => DEFAULT_HEADERS).
|
979
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/sample_service/result_select_products_name_price.xml", __FILE__)), :headers => {})
|
946
980
|
end
|
947
981
|
|
948
982
|
subject do
|
@@ -959,12 +993,12 @@ module OData
|
|
959
993
|
context "when there isn't a property by the name specified" do
|
960
994
|
before(:each) do
|
961
995
|
stub_request(:get, "http://test.com/test.svc/$metadata").
|
962
|
-
|
963
|
-
|
996
|
+
with(:headers => DEFAULT_HEADERS).
|
997
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/sample_service/edmx_categories_products.xml", __FILE__)), :headers => {})
|
964
998
|
|
965
999
|
stub_request(:get, "http://test.com/test.svc/Categories?$select=Price").
|
966
|
-
|
967
|
-
|
1000
|
+
with(:headers => DEFAULT_HEADERS).
|
1001
|
+
to_return(:status => 400, :body => File.new(File.expand_path("../fixtures/sample_service/result_select_categories_no_property.xml", __FILE__)), :headers => {})
|
968
1002
|
end
|
969
1003
|
|
970
1004
|
it "raises an exception" do
|
@@ -980,16 +1014,16 @@ module OData
|
|
980
1014
|
context "when a property requires $expand to traverse" do
|
981
1015
|
before(:each) do
|
982
1016
|
stub_request(:get, "http://test.com/test.svc/$metadata").
|
983
|
-
|
984
|
-
|
1017
|
+
with(:headers => DEFAULT_HEADERS).
|
1018
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/sample_service/edmx_categories_products.xml", __FILE__)), :headers => {})
|
985
1019
|
|
986
1020
|
stub_request(:get, "http://test.com/test.svc/Categories?$select=Name,Products/Name").
|
987
|
-
|
988
|
-
|
1021
|
+
with(:headers => DEFAULT_HEADERS).
|
1022
|
+
to_return(:status => 400, :body => File.new(File.expand_path("../fixtures/sample_service/result_select_categories_travsing_no_expand.xml", __FILE__)), :headers => {})
|
989
1023
|
|
990
1024
|
stub_request(:get, "http://test.com/test.svc/Categories?$select=Name,Products/Name&$expand=Products").
|
991
|
-
|
992
|
-
|
1025
|
+
with(:headers => DEFAULT_HEADERS).
|
1026
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/sample_service/result_select_categories_expand.xml", __FILE__)), :headers => {})
|
993
1027
|
end
|
994
1028
|
|
995
1029
|
it "doesn't error" do
|
@@ -1010,13 +1044,14 @@ module OData
|
|
1010
1044
|
end
|
1011
1045
|
end
|
1012
1046
|
end
|
1047
|
+
|
1013
1048
|
describe_private OData::Service do
|
1014
1049
|
describe "parse value" do
|
1015
1050
|
before(:each) do
|
1016
1051
|
# Required for the build_classes method
|
1017
1052
|
stub_request(:get, "http://test.com/test.svc/$metadata").
|
1018
|
-
|
1019
|
-
|
1053
|
+
with(:headers => DEFAULT_HEADERS).
|
1054
|
+
to_return(:status => 200, :body => File.new(File.expand_path("../fixtures/edmx_empty.xml", __FILE__)), :headers => {})
|
1020
1055
|
end
|
1021
1056
|
|
1022
1057
|
it "should not error on an 'out of range' date" do
|