QuickBooks/SQL/Schema.php
static public function mapPrimaryKey($path_or_tablefield, $mode, &$map, $options = array())
	{		
		static $xml_to_sql = array(
			'AccountRet' => 																			array( 'Account', 'ListID' ), 
			'AccountRet TaxLineInfoRet' => 																array( 'Account_TaxLineInfo', array( 'Account_ListID', 'TaxLineInfo_TaxLineID') ), 
			'AccountRet DataExtRet' => 																	array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'BillingRateRet' =>  																		array( 'BillingRate', 'ListID' ),
			'BillingRateRet BillingRatePerItemRet' => 													array( 'BillingRate_BillingRatePerItem', array( 'BillingRate_ListID', 'Item_ListID' ) ),		
			'BillPaymentCheckRet' => 																	array( 'BillPaymentCheck', 'TxnID' ),
			'BillPaymentCheckRet AppliedToTxnRet' => 													array( 'BillPaymentCheck_AppliedToTxn', array( 'ToTxnID', 'FromTxnID' ) ), 
			'BillPaymentCheckRet DataExtRet' => 														array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'BillPaymentCreditCardRet' => 																array( 'BillPaymentCreditCard', 'TxnID' ),
			'BillPaymentCreditCardRet AppliedToTxnRet' => 												array( 'BillPaymentCreditCard_AppliedToTxn', array( 'ToTxnID', 'FromTxnID' ) ), 
			'BillPaymentCreditCardRet DataExtRet' => 													array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'BillRet' => 																				array( 'Bill', 'TxnID' ),
			'BillRet LinkedTxn' => 																		array( 'Bill_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ),
			'BillRet ExpenseLineRet' => 																array( 'Bill_ExpenseLine', array( 'Bill_TxnID', 'TxnLineID') ),  	
			'BillRet ItemLineRet' => 																	array( 'Bill_ItemLine', array( 'Bill_TxnID', 'TxnLineID' ) ),  	
			'BillRet ItemGroupLineRet' => 																array( 'Bill_ItemGroupLine', array( 'Bill_TxnID', 'TxnLineID' ) ), 
			'BillRet ItemGroupLineRet ItemLineRet' => 													array( 'Bill_ItemGroupLine_ItemLine', array( 'Bill_TxnID', 'Bill_ItemGroupLine_TxnLineID', 'TxnLineID' ) ), 	
			'BillRet DataExtRet' => 																	array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'BillToPayRet BillToPay' => 																array( 'BillToPay', 'TxnID' ), 
			'BillToPayRet CreditToApply' => 															array( 'CreditToApply', 'TxnID' ), 
			'BuildAssemblyRet' => 																		array( 'BuildAssembly', 'TxnID' ),  
			'ChargeRet' => 																				array( 'Charge', 'TxnID' ),  
			'ChargeRet DataExtRet' => 																	array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'CheckRet' => 																				array( 'Check', 'TxnID' ), 
			'CheckRet ExpenseLineRet' => 																array( 'Check_ExpenseLine', array( 'Check_TxnID', 'TxnLineID' ) ), 
			'CheckRet ItemLineRet' => 																	array( 'Check_ItemLine', array( 'Check_TxnID', 'TxnLineID' ) ), 
			'CheckRet ItemGroupLineRet' => 																array( 'Check_ItemGroupLine', array( 'Check_TxnID', 'TxnLineID' ) ), 
			'CheckRet ItemGroupLineRet ItemLineRet' => 													array( 'Check_ItemGroupLine_ItemLine', array( 'Check_TxnID', 'Check_ItemGroupLine_TxnLineID', 'TxnLineID' ) ),
			'CheckRet DataExtRet' => 																	array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'CheckRet LinkedTxn' => 																	array( 'Check_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), 
			'ClassRet' => 																				array( 'Class', 'ListID' ), 
			'CompanyRet' => 																			array( 'Company', 'CompanyName' ),  
			'CompanyRet SubscribedServices Services' =>													array( 'Company_SubscribedServices_Services', array('Company_CompanyName', 'Name') ),  
			'CompanyRet DataExtRet' => 																	array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'HostRet' => 																				array( 'Host', 'ProductName' ), 
			'PreferencesRet' => 																		array( 'Preferences', 'qbsql_external_id' ), 
			'CreditCardChargeRet' =>																	array( 'CreditCardCharge', 'TxnID' ),
			'CreditCardChargeRet ExpenseLineRet' =>														array( 'CreditCardCharge_ExpenseLine', array( 'CreditCardCharge_TxnID', 'TxnLineID' ) ),
			'CreditCardChargeRet ItemLineRet' =>														array( 'CreditCardCharge_ItemLine', array( 'CreditCardCharge_TxnID', 'TxnLineID' ) ),
			'CreditCardChargeRet ItemGroupLineRet' =>													array( 'CreditCardCharge_ItemGroupLine', array( 'CreditCardCharge_TxnID', 'TxnLineID' ) ),
			'CreditCardChargeRet ItemGroupLineRet ItemLineRet' =>										array( 'CreditCardCharge_ItemGroupLine_ItemLine', array( 'CreditCardCharge_TxnID', 'CreditCardCharge_ItemGroupLine_TxnLineID', 'TxnLineID' ) ),
			'CreditCardChargeRet DataExtRet' => 														array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'CreditCardCreditRet' =>																	array( 'CreditCardCredit', 'TxnID' ),
			'CreditCardCreditRet ExpenseLineRet' =>														array( 'CreditCardCredit_ExpenseLine', array( 'CreditCardCredit_TxnID', 'TxnLineID' ) ),
			'CreditCardCreditRet ItemLineRet' =>														array( 'CreditCardCredit_ItemLine', array( 'CreditCardCredit_TxnID', 'TxnLineID' ) ),
			'CreditCardCreditRet ItemGroupLineRet' =>													array( 'CreditCardCredit_ItemGroupLine', array( 'CreditCardCredit_TxnID', 'TxnLineID' ) ),
			'CreditCardCreditRet ItemGroupLineRet ItemLineRet' =>										array( 'CreditCardCredit_ItemGroupLine_ItemLine', array( 'CreditCardCredit_TxnID', 'CreditCardCredit_ItemGroupLine_TxnLineID', 'TxnLineID' ) ),
			'CreditCardCreditRet DataExtRet' => 														array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'CreditMemoRet' => 																			array( 'CreditMemo', 'TxnID' ), 
			'CreditMemoRet CreditMemoLineRet' => 														array( 'CreditMemo_CreditMemoLine', array( 'CreditMemo_TxnID', 'TxnLineID' ) ), 
			'CreditMemoRet CreditMemoLineGroupRet' => 													array( 'CreditMemo_CreditMemoLineGroup', array( 'CreditMemo_TxnID', 'TxnLineID' ) ), 
			//'CreditMemoRet CreditMemoLineGroupRet ItemGroupRef' => 									array( null, null ), 
			//'CreditMemoRet CreditMemoLineGroupRet ItemGroupRef *' => 									array( 'CreditMemo_CreditMemoLineGroup', 'ItemGroup_*' ), 
			'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet' => 								array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', array( 'CreditMemo_TxnID', 'CreditMemo_CreditMemoLineGroup_TxnLineID', 'TxnLineID' ) ), 
			'CreditMemoRet DataExtRet' => 																array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'CreditMemoRet CreditMemoLineGroupRet DataExtRet' => 										array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet DataExtRet' => 						array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'CreditMemoRet LinkedTxn' => 																array( 'CreditMemo_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), 
			'CustomerRet' => 																			array( 'Customer', 'ListID' ),
			'CustomerRet DataExtRet' => 																array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'CustomerMsgRet' => 																		array( 'CustomerMsg', 'ListID' ),
			'CustomerTypeRet' => 																		array( 'CustomerType', 'ListID' ),
			'CurrencyRet' => 																			array( 'Currency', 'ListID' ), 
			'DataExtDefRet' => 																			array( 'DataExtDef', 'DataExtName' ),
			'DataExtDefRet AssignToObject' => 															array( 'DataExtDef_AssignToObject', array( 'DataExtDef_DataExtName', 'AssignToObject' ) ),
			'DateDrivenTermsRet' => 																	array( 'DateDrivenTerms', 'ListID' ),
			'DepositRet' => 																			array( 'Deposit', 'TxnID' ), 
			'DepositRet DepositLineRet' => 																array( 'Deposit_DepositLine', array( 'Deposit_TxnID', 'TxnID' ) ), 
			'DepositRet DataExtRet' => 																	array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'EmployeeRet' => 																			array( 'Employee', 'ListID' ), 
			'EmployeeRet EmployeePayrollInfo Earnings' => 												array( 'Employee_Earnings', array( 'Employee_ListID', 'PayrollItemWage_ListID' ) ), 
			'EmployeeRet DataExtRet' => 																array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'EstimateRet' => 																			array( 'Estimate', 'TxnID' ), 
			'EstimateRet EstimateLineRet' => 															array( 'Estimate_EstimateLine', array( 'Estimate_TxnID', 'TxnLineID' ) ),  
			'EstimateRet EstimateLineRet DataExtRet' => 												array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'EstimateRet EstimateLineGroupRet' => 														array( 'Estimate_EstimateLineGroup', array( 'Estimate_TxnID', 'TxnLineID' ) ), 
			'EstimateRet EstimateLineGroupRet DataExtRet' => 											array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'EstimateRet EstimateLineGroupRet EstimateLineRet' => 										array( 'Estimate_EstimateLineGroup_EstimateLine', array( 'Estimate_TxnID', 'Estimate_EstimateLineGroup_TxnLineID', 'TxnLineID' ) ), 
			'EstimateRet EstimateLineGroupRet EstimateLineRet DataExtRet' => 							array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'EstimateRet LinkedTxn' => 																	array( 'Estimate_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), 		
			'EstimateRet DataExtRet' => 																array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'InventoryAdjustmentRet' => 																array( 'InventoryAdjustment', 'TxnID' ), 
			'InventoryAdjustmentRet InventoryAdjustmentLineRet' => 										array( 'InventoryAdjustment_InventoryAdjustmentLine', array( 'InventoryAdjustment_TxnID', 'TxnLineID' ) ), 
			'InventoryAdjustmentRet DataExtRet' => 														array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'InvoiceRet' => 																			array( 'Invoice', 'TxnID' ), 
			'InvoiceRet InvoiceLineRet' => 																array( 'Invoice_InvoiceLine', array( 'Invoice_TxnID', 'TxnLineID' ) ),  
			'InvoiceRet InvoiceLineRet DataExtRet' => 													array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'InvoiceRet InvoiceLineGroupRet' => 														array( 'Invoice_InvoiceLineGroup', array( 'Invoice_TxnID', 'TxnLineID' ) ), 
			'InvoiceRet InvoiceLineGroupRet DataExtRet' => 												array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'InvoiceRet InvoiceLineGroupRet InvoiceLineRet' => 											array( 'Invoice_InvoiceLineGroup_InvoiceLine', array( 'Invoice_TxnID', 'Invoice_InvoiceLineGroup_TxnLineID', 'TxnLineID' ) ), 
			'InvoiceRet InvoiceLineGroupRet InvoiceLineRet DataExtRet' => 								array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'InvoiceRet LinkedTxn' => 																	array( 'Invoice_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), 
			'InvoiceRet DataExtRet' => 																	array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemInventoryRet' => 																		array( 'ItemInventory', 'ListID' ), 
			'ItemInventoryRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemInventoryAssemblyRet' => 																array( 'ItemInventoryAssembly', 'ListID' ), 
			'ItemInventoryAssemblyRet ItemInventoryAssemblyLine' => 									array( 'ItemInventoryAssembly_ItemInventoryAssemblyLine', array( 'ItemInventoryAssembly_ListID', 'ItemInventory_ListID' ) ), 
			'ItemInventoryAssemblyRet DataExtRet' => 													array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemNonInventoryRet' => 																	array( 'ItemNonInventory', 'ListID' ), 
			'ItemNonInventoryRet DataExtRet' => 														array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemDiscountRet' => 																		array( 'ItemDiscount', 'ListID' ),
			'ItemDiscountRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemFixedAssetRet' => 																		array( 'ItemFixedAsset', 'ListID' ),
			'ItemFixedAssetRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemGroupRet' => 																			array( 'ItemGroup', 'ListID' ),
			'ItemGroupRet ItemGroupLine' => 															array( 'ItemGroup_ItemGroupLine', array( 'ItemGroup_ListID', 'Item_ListID' ) ),
			'ItemGroupRet DataExtRet' => 																array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemOtherChargeRet' => 																	array( 'ItemOtherCharge', 'ListID' ), 
			'ItemOtherChargeRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemPaymentRet' => 																		array( 'ItemPayment', 'ListID' ), 
			'ItemPaymentRet DataExtRet' => 																array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemReceiptRet' => 																		array( 'ItemReceipt', 'TxnID' ), 
			'ItemReceiptRet ExpenseLineRet' => 															array( 'ItemReceipt_ExpenseLine', array( 'ItemReceipt_TxnID', 'TxnLineID' ) ), 
			'ItemReceiptRet ItemLineRet' => 															array( 'ItemReceipt_ItemLine', array( 'ItemReceipt_TxnID', 'TxnLineID' ) ), 
			'ItemReceiptRet ItemGroupLineRet' => 														array( 'ItemReceipt_ItemGroupLine', array( 'ItemReceipt_TxnID', 'TxnLineID' ) ), 
			'ItemReceiptRet ItemGroupLineRet ItemLineRet' => 											array( 'ItemReceipt_ItemGroupLine_ItemLine', array( 'ItemReceipt_TxnID', 'ItemReceipt_ItemGroupLine_TxnLineID', 'TxnLineID' ) ), 
			'ItemReceiptRet LinkedTxn' => 																array( 'ItemReceipt_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), 
			'ItemReceiptRet DataExtRet' => 																array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemSalesTaxRet' => 																		array( 'ItemSalesTax', 'ListID' ), 
			'ItemSalesTaxRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemSalesTaxGroupRet' => 																	array( 'ItemSalesTaxGroup', 'ListID' ), 
			'ItemSalesTaxGroupRet ItemSalesTaxRef' => 													array( 'ItemSalesTaxGroup_ItemSalesTax', array( 'ItemSalesTaxGroup_ListID', 'ListID' ) ), 
			'ItemSalesTaxGroupRet DataExtRet' => 														array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemServiceRet' => 																		array( 'ItemService', 'ListID' ), 
			'ItemServiceRet DataExtRet' => 																array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemSubtotalRet' => 																		array( 'ItemSubtotal', 'ListID' ),
			'ItemSubtotalRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'JobTypeRet' => 																			array( 'JobType', 'ListID' ),
			'JournalEntryRet' => 																		array( 'JournalEntry', 'TxnID' ),
			'JournalEntryRet JournalCreditLine' => 														array( 'JournalEntry_JournalCreditLine', array( 'JournalEntry_TxnID', 'TxnLineID' ) ),
			'JournalEntryRet JournalDebitLine' => 														array( 'JournalEntry_JournalDebitLine', array( 'JournalEntry_TxnID', 'TxnLineID' ) ),
			'JournalEntryRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'PaymentMethodRet' => 																		array( 'PaymentMethod', 'ListID' ),
			'PayrollItemWageRet' => 																	array( 'PayrollItemWage', 'ListID' ),
			'PriceLevelRet' => 																			array( 'PriceLevel', 'ListID' ),
			'PriceLevelRet PriceLevelPerItemRet' => 													array( 'PriceLevel_PriceLevelPerItem', array( 'PriceLevel_ListID', 'Item_ListID' ) ),
			'PurchaseOrderRet' =>																		array( 'PurchaseOrder', 'TxnID' ),
			'PurchaseOrderRet PurchaseOrderLineRet' =>													array( 'PurchaseOrder_PurchaseOrderLine', array( 'PurchaseOrder_TxnID', 'TxnLineID' ) ),
			'PurchaseOrderRet PurchaseOrderLineRet DataExtRet' => 										array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'PurchaseOrderRet PurchaseOrderLineGroupRet' =>												array( 'PurchaseOrder_PurchaseOrderLineGroup', array( 'PurchaseOrder_TxnID', 'TxnLineID' ) ),
			'PurchaseOrderRet PurchaseOrderLineGroupRet DataExtRet' => 									array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet' =>						array( 'PurchaseOrder_PurchaseOrderLineGroup_PurchaseOrderLine', array( 'PurchaseOrder_TxnID', 'PurchaseOrder_PurchaseOrderLineGroup_TxnLineID', 'TxnLineID' ) ),
			'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet DataExtRet' => 			array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'PurchaseOrderRet LinkedTxn' => 															array( 'PurchaseOrder_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), 
			'PurchaseOrderRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ReceivePaymentRet' => 																		array( 'ReceivePayment', 'TxnID' ),  			
			'ReceivePaymentRet AppliedToTxnRet' => 														array( 'ReceivePayment_AppliedToTxn', array( 'ToTxnID', 'FromTxnID' ) ), 
			'ReceivePaymentRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'SalesOrderRet' => 																			array( 'SalesOrder', 'TxnID' ),
			'SalesOrderRet SalesOrderLineRet' => 														array( 'SalesOrder_SalesOrderLine', array( 'SalesOrder_TxnID', 'TxnLineID' ) ),
			'SalesOrderRet SalesOrderLineRet DataExtRet' => 											array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'SalesOrderRet SalesOrderLineGroupRet' => 													array( 'SalesOrder_SalesOrderLineGroup', array( 'SalesOrder_TxnID', 'TxnLineID' ) ),
			'SalesOrderRet SalesOrderLineGroupRet DataExtRet' => 										array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet' => 								array( 'SalesOrder_SalesOrderLineGroup_SalesOrderLine', array( 'SalesOrder_TxnID', 'SalesOrder_SalesOrderLineGroup_TxnLineID', 'TxnLineID' ) ),
			'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet DataExtRet' => 						array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'SalesOrderRet LinkedTxn' => 																array( 'SalesOrder_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), 	
			'SalesOrderRet DataExtRet' => 																array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'SalesReceiptRet' =>																		array( 'SalesReceipt', 'TxnID' ),
			'SalesReceiptRet SalesReceiptLineRet' =>													array( 'SalesReceipt_SalesReceiptLine', array( 'SalesReceipt_TxnID', 'TxnLineID' ) ),
			'SalesReceiptRet SalesReceiptLineRet DataExtRet' => 										array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'SalesReceiptRet SalesReceiptLineGroupRet' =>												array( 'SalesReceipt_SalesReceiptLineGroup', array( 'SalesReceipt_TxnID', 'TxnLineID' ) ),
			'SalesReceiptRet SalesReceiptLineGroupRet DataExtRet' => 									array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet' =>							array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', array( 'SalesReceipt_TxnID', 'SalesReceipt_SalesReceiptLineGroup_TxnLineID', 'TxnLineID' ) ),
			'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet DataExtRet' => 				array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'SalesReceiptRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'SalesRepRet' =>																			array( 'SalesRep', 'ListID' ),
			'SalesTaxCodeRet' =>																		array( 'SalesTaxCode', 'ListID' ),
			'ShipMethodRet' =>																			array( 'ShipMethod', 'ListID' ),
			'StandardTermsRet' => 																		array( 'StandardTerms', 'ListID' ),
			'TimeTrackingRet' => 																		array( 'TimeTracking', 'TxnID' ),  	
			'UnitOfMeasureSetRet' => 																	array( 'UnitOfMeasureSet', 'ListID' ),  	
			'UnitOfMeasureSetRet RelatedUnit' => 														array( 'UnitOfMeasureSet_RelatedUnit', array( 'UnitOfMeasureSet_ListID', 'Name' ) ),  	
			'UnitOfMeasureSetRet DefaultUnit' => 														array( 'UnitOfMeasureSet_DefaultUnit', array( 'UnitOfMeasureSet_ListID', 'UnitUsedFor' ) ),  		
			'VehicleRet' => 																			array( 'Vehicle', 'ListID' ),
			'VehicleMileageRet' => 																		array( 'VehicleMileage', 'TxnID' ), 
			'VendorRet' => 																				array( 'Vendor', 'ListID' ),  
			'VendorRet DataExtRet' => 																	array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'VendorCreditRet' => 																		array( 'VendorCredit', 'TxnID' ),  
			'VendorCreditRet ExpenseLineRet' => 														array( 'VendorCredit_ExpenseLine', array( 'VendorCredit_TxnID', 'TxnLineID' ) ),  
			'VendorCreditRet ItemLineRet' => 															array( 'VendorCredit_ItemLine', array( 'VendorCredit_TxnID', 'TxnLineID' ) ),  
			'VendorCreditRet ItemGroupLineRet' => 														array( 'VendorCredit_ItemGroupLine', array( 'VendorCredit_TxnID', 'TxnLineID' ) ),  
			'VendorCreditRet ItemGroupLineRet ItemLineRet' => 											array( 'VendorCredit_ItemGroupLine_ItemLine', array( 'VendorCredit_TxnID', 'VendorCredit_ItemGroupLine_TxnLineID', 'TxnLineID' ) ),  
			'VendorCreditRet LinkedTxn' => 																array( 'VendorCredit_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), 
			'VendorCreditRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'VendorTypeRet' => 																			array( 'VendorType', 'ListID' ),  
			'WorkersCompCodeRet' => 																	array( 'WorkersCompCode', 'ListID' ),  
				
			);
			
		if ($mode == QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL)
		{
			if (!isset($xml_to_sql[$path_or_tablefield]))
			{
				if (substr($path_or_tablefield, -3, 3) != 'Ret')
				{
					//$path_or_tablefield = substr($path_or_tablefield, 0, -3);
					$path_or_tablefield .= 'Ret';
					
					if (isset($xml_to_sql[$path_or_tablefield]))
					{
						$map = $xml_to_sql[$path_or_tablefield];
						QuickBooks_SQL_Schema::_applyOptions($map, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $options);
					}
				}
			}
			else
			{
				$map = $xml_to_sql[$path_or_tablefield];
				QuickBooks_SQL_Schema::_applyOptions($map, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $options);
			}
		}
		else
		{
			
		}
		
		return;
	}
static public function mapPrimaryKey($path_or_tablefield, $mode, &$map, $options = array())
	{		
		static $xml_to_sql = array(
			'AccountRet' => 																			array( 'Account', 'ListID' ), 
			'AccountRet TaxLineInfoRet' => 																array( 'Account_TaxLineInfo', array( 'Account_ListID', 'TaxLineInfo_TaxLineID') ), 
			'AccountRet DataExtRet' => 																	array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'BillingRateRet' =>  																		array( 'BillingRate', 'ListID' ),
			'BillingRateRet BillingRatePerItemRet' => 													array( 'BillingRate_BillingRatePerItem', array( 'BillingRate_ListID', 'Item_ListID' ) ),		
			'BillPaymentCheckRet' => 																	array( 'BillPaymentCheck', 'TxnID' ),
			'BillPaymentCheckRet AppliedToTxnRet' => 													array( 'BillPaymentCheck_AppliedToTxn', array( 'ToTxnID', 'FromTxnID' ) ), 
			'BillPaymentCheckRet DataExtRet' => 														array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'BillPaymentCreditCardRet' => 																array( 'BillPaymentCreditCard', 'TxnID' ),
			'BillPaymentCreditCardRet AppliedToTxnRet' => 												array( 'BillPaymentCreditCard_AppliedToTxn', array( 'ToTxnID', 'FromTxnID' ) ), 
			'BillPaymentCreditCardRet DataExtRet' => 													array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'BillRet' => 																				array( 'Bill', 'TxnID' ),
			'BillRet LinkedTxn' => 																		array( 'Bill_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ),
			'BillRet ExpenseLineRet' => 																array( 'Bill_ExpenseLine', array( 'Bill_TxnID', 'TxnLineID') ),  	
			'BillRet ItemLineRet' => 																	array( 'Bill_ItemLine', array( 'Bill_TxnID', 'TxnLineID' ) ),  	
			'BillRet ItemGroupLineRet' => 																array( 'Bill_ItemGroupLine', array( 'Bill_TxnID', 'TxnLineID' ) ), 
			'BillRet ItemGroupLineRet ItemLineRet' => 													array( 'Bill_ItemGroupLine_ItemLine', array( 'Bill_TxnID', 'Bill_ItemGroupLine_TxnLineID', 'TxnLineID' ) ), 	
			'BillRet DataExtRet' => 																	array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'BillToPayRet BillToPay' => 																array( 'BillToPay', 'TxnID' ), 
			'BillToPayRet CreditToApply' => 															array( 'CreditToApply', 'TxnID' ), 
			'BuildAssemblyRet' => 																		array( 'BuildAssembly', 'TxnID' ),  
			'ChargeRet' => 																				array( 'Charge', 'TxnID' ),  
			'ChargeRet DataExtRet' => 																	array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'CheckRet' => 																				array( 'Check', 'TxnID' ), 
			'CheckRet ExpenseLineRet' => 																array( 'Check_ExpenseLine', array( 'Check_TxnID', 'TxnLineID' ) ), 
			'CheckRet ItemLineRet' => 																	array( 'Check_ItemLine', array( 'Check_TxnID', 'TxnLineID' ) ), 
			'CheckRet ItemGroupLineRet' => 																array( 'Check_ItemGroupLine', array( 'Check_TxnID', 'TxnLineID' ) ), 
			'CheckRet ItemGroupLineRet ItemLineRet' => 													array( 'Check_ItemGroupLine_ItemLine', array( 'Check_TxnID', 'Check_ItemGroupLine_TxnLineID', 'TxnLineID' ) ),
			'CheckRet DataExtRet' => 																	array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'CheckRet LinkedTxn' => 																	array( 'Check_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), 
			'ClassRet' => 																				array( 'Class', 'ListID' ), 
			'CompanyRet' => 																			array( 'Company', 'CompanyName' ),  
			'CompanyRet SubscribedServices Services' =>													array( 'Company_SubscribedServices_Services', array('Company_CompanyName', 'Name') ),  
			'CompanyRet DataExtRet' => 																	array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'HostRet' => 																				array( 'Host', 'ProductName' ), 
			'PreferencesRet' => 																		array( 'Preferences', 'qbsql_external_id' ), 
			'CreditCardChargeRet' =>																	array( 'CreditCardCharge', 'TxnID' ),
			'CreditCardChargeRet ExpenseLineRet' =>														array( 'CreditCardCharge_ExpenseLine', array( 'CreditCardCharge_TxnID', 'TxnLineID' ) ),
			'CreditCardChargeRet ItemLineRet' =>														array( 'CreditCardCharge_ItemLine', array( 'CreditCardCharge_TxnID', 'TxnLineID' ) ),
			'CreditCardChargeRet ItemGroupLineRet' =>													array( 'CreditCardCharge_ItemGroupLine', array( 'CreditCardCharge_TxnID', 'TxnLineID' ) ),
			'CreditCardChargeRet ItemGroupLineRet ItemLineRet' =>										array( 'CreditCardCharge_ItemGroupLine_ItemLine', array( 'CreditCardCharge_TxnID', 'CreditCardCharge_ItemGroupLine_TxnLineID', 'TxnLineID' ) ),
			'CreditCardChargeRet DataExtRet' => 														array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'CreditCardCreditRet' =>																	array( 'CreditCardCredit', 'TxnID' ),
			'CreditCardCreditRet ExpenseLineRet' =>														array( 'CreditCardCredit_ExpenseLine', array( 'CreditCardCredit_TxnID', 'TxnLineID' ) ),
			'CreditCardCreditRet ItemLineRet' =>														array( 'CreditCardCredit_ItemLine', array( 'CreditCardCredit_TxnID', 'TxnLineID' ) ),
			'CreditCardCreditRet ItemGroupLineRet' =>													array( 'CreditCardCredit_ItemGroupLine', array( 'CreditCardCredit_TxnID', 'TxnLineID' ) ),
			'CreditCardCreditRet ItemGroupLineRet ItemLineRet' =>										array( 'CreditCardCredit_ItemGroupLine_ItemLine', array( 'CreditCardCredit_TxnID', 'CreditCardCredit_ItemGroupLine_TxnLineID', 'TxnLineID' ) ),
			'CreditCardCreditRet DataExtRet' => 														array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'CreditMemoRet' => 																			array( 'CreditMemo', 'TxnID' ), 
			'CreditMemoRet CreditMemoLineRet' => 														array( 'CreditMemo_CreditMemoLine', array( 'CreditMemo_TxnID', 'TxnLineID' ) ), 
			'CreditMemoRet CreditMemoLineGroupRet' => 													array( 'CreditMemo_CreditMemoLineGroup', array( 'CreditMemo_TxnID', 'TxnLineID' ) ), 
			//'CreditMemoRet CreditMemoLineGroupRet ItemGroupRef' => 									array( null, null ), 
			//'CreditMemoRet CreditMemoLineGroupRet ItemGroupRef *' => 									array( 'CreditMemo_CreditMemoLineGroup', 'ItemGroup_*' ), 
			'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet' => 								array( 'CreditMemo_CreditMemoLineGroup_CreditMemoLine', array( 'CreditMemo_TxnID', 'CreditMemo_CreditMemoLineGroup_TxnLineID', 'TxnLineID' ) ), 
			'CreditMemoRet DataExtRet' => 																array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'CreditMemoRet CreditMemoLineGroupRet DataExtRet' => 										array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'CreditMemoRet CreditMemoLineGroupRet CreditMemoLineRet DataExtRet' => 						array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'CreditMemoRet LinkedTxn' => 																array( 'CreditMemo_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), 
			'CustomerRet' => 																			array( 'Customer', 'ListID' ),
			'CustomerRet DataExtRet' => 																array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'CustomerMsgRet' => 																		array( 'CustomerMsg', 'ListID' ),
			'CustomerTypeRet' => 																		array( 'CustomerType', 'ListID' ),
			'CurrencyRet' => 																			array( 'Currency', 'ListID' ), 
			'DataExtDefRet' => 																			array( 'DataExtDef', 'DataExtName' ),
			'DataExtDefRet AssignToObject' => 															array( 'DataExtDef_AssignToObject', array( 'DataExtDef_DataExtName', 'AssignToObject' ) ),
			'DateDrivenTermsRet' => 																	array( 'DateDrivenTerms', 'ListID' ),
			'DepositRet' => 																			array( 'Deposit', 'TxnID' ), 
			'DepositRet DepositLineRet' => 																array( 'Deposit_DepositLine', array( 'Deposit_TxnID', 'TxnID' ) ), 
			'DepositRet DataExtRet' => 																	array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'EmployeeRet' => 																			array( 'Employee', 'ListID' ), 
			'EmployeeRet EmployeePayrollInfo Earnings' => 												array( 'Employee_Earnings', array( 'Employee_ListID', 'PayrollItemWage_ListID' ) ), 
			'EmployeeRet DataExtRet' => 																array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'EstimateRet' => 																			array( 'Estimate', 'TxnID' ), 
			'EstimateRet EstimateLineRet' => 															array( 'Estimate_EstimateLine', array( 'Estimate_TxnID', 'TxnLineID' ) ),  
			'EstimateRet EstimateLineRet DataExtRet' => 												array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'EstimateRet EstimateLineGroupRet' => 														array( 'Estimate_EstimateLineGroup', array( 'Estimate_TxnID', 'TxnLineID' ) ), 
			'EstimateRet EstimateLineGroupRet DataExtRet' => 											array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'EstimateRet EstimateLineGroupRet EstimateLineRet' => 										array( 'Estimate_EstimateLineGroup_EstimateLine', array( 'Estimate_TxnID', 'Estimate_EstimateLineGroup_TxnLineID', 'TxnLineID' ) ), 
			'EstimateRet EstimateLineGroupRet EstimateLineRet DataExtRet' => 							array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'EstimateRet LinkedTxn' => 																	array( 'Estimate_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), 		
			'EstimateRet DataExtRet' => 																array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'InventoryAdjustmentRet' => 																array( 'InventoryAdjustment', 'TxnID' ), 
			'InventoryAdjustmentRet InventoryAdjustmentLineRet' => 										array( 'InventoryAdjustment_InventoryAdjustmentLine', array( 'InventoryAdjustment_TxnID', 'TxnLineID' ) ), 
			'InventoryAdjustmentRet DataExtRet' => 														array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'InvoiceRet' => 																			array( 'Invoice', 'TxnID' ), 
			'InvoiceRet InvoiceLineRet' => 																array( 'Invoice_InvoiceLine', array( 'Invoice_TxnID', 'TxnLineID' ) ),  
			'InvoiceRet InvoiceLineRet DataExtRet' => 													array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'InvoiceRet InvoiceLineGroupRet' => 														array( 'Invoice_InvoiceLineGroup', array( 'Invoice_TxnID', 'TxnLineID' ) ), 
			'InvoiceRet InvoiceLineGroupRet DataExtRet' => 												array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'InvoiceRet InvoiceLineGroupRet InvoiceLineRet' => 											array( 'Invoice_InvoiceLineGroup_InvoiceLine', array( 'Invoice_TxnID', 'Invoice_InvoiceLineGroup_TxnLineID', 'TxnLineID' ) ), 
			'InvoiceRet InvoiceLineGroupRet InvoiceLineRet DataExtRet' => 								array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),
			'InvoiceRet LinkedTxn' => 																	array( 'Invoice_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), 
			'InvoiceRet DataExtRet' => 																	array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemInventoryRet' => 																		array( 'ItemInventory', 'ListID' ), 
			'ItemInventoryRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemInventoryAssemblyRet' => 																array( 'ItemInventoryAssembly', 'ListID' ), 
			'ItemInventoryAssemblyRet ItemInventoryAssemblyLine' => 									array( 'ItemInventoryAssembly_ItemInventoryAssemblyLine', array( 'ItemInventoryAssembly_ListID', 'ItemInventory_ListID' ) ), 
			'ItemInventoryAssemblyRet DataExtRet' => 													array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemNonInventoryRet' => 																	array( 'ItemNonInventory', 'ListID' ), 
			'ItemNonInventoryRet DataExtRet' => 														array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemDiscountRet' => 																		array( 'ItemDiscount', 'ListID' ),
			'ItemDiscountRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemFixedAssetRet' => 																		array( 'ItemFixedAsset', 'ListID' ),
			'ItemFixedAssetRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemGroupRet' => 																			array( 'ItemGroup', 'ListID' ),
			'ItemGroupRet ItemGroupLine' => 															array( 'ItemGroup_ItemGroupLine', array( 'ItemGroup_ListID', 'Item_ListID' ) ),
			'ItemGroupRet DataExtRet' => 																array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemOtherChargeRet' => 																	array( 'ItemOtherCharge', 'ListID' ), 
			'ItemOtherChargeRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemPaymentRet' => 																		array( 'ItemPayment', 'ListID' ), 
			'ItemPaymentRet DataExtRet' => 																array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemReceiptRet' => 																		array( 'ItemReceipt', 'TxnID' ), 
			'ItemReceiptRet ExpenseLineRet' => 															array( 'ItemReceipt_ExpenseLine', array( 'ItemReceipt_TxnID', 'TxnLineID' ) ), 
			'ItemReceiptRet ItemLineRet' => 															array( 'ItemReceipt_ItemLine', array( 'ItemReceipt_TxnID', 'TxnLineID' ) ), 
			'ItemReceiptRet ItemGroupLineRet' => 														array( 'ItemReceipt_ItemGroupLine', array( 'ItemReceipt_TxnID', 'TxnLineID' ) ), 
			'ItemReceiptRet ItemGroupLineRet ItemLineRet' => 											array( 'ItemReceipt_ItemGroupLine_ItemLine', array( 'ItemReceipt_TxnID', 'ItemReceipt_ItemGroupLine_TxnLineID', 'TxnLineID' ) ), 
			'ItemReceiptRet LinkedTxn' => 																array( 'ItemReceipt_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), 
			'ItemReceiptRet DataExtRet' => 																array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemSalesTaxRet' => 																		array( 'ItemSalesTax', 'ListID' ), 
			'ItemSalesTaxRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemSalesTaxGroupRet' => 																	array( 'ItemSalesTaxGroup', 'ListID' ), 
			'ItemSalesTaxGroupRet ItemSalesTaxRef' => 													array( 'ItemSalesTaxGroup_ItemSalesTax', array( 'ItemSalesTaxGroup_ListID', 'ListID' ) ), 
			'ItemSalesTaxGroupRet DataExtRet' => 														array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemServiceRet' => 																		array( 'ItemService', 'ListID' ), 
			'ItemServiceRet DataExtRet' => 																array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ItemSubtotalRet' => 																		array( 'ItemSubtotal', 'ListID' ),
			'ItemSubtotalRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'JobTypeRet' => 																			array( 'JobType', 'ListID' ),
			'JournalEntryRet' => 																		array( 'JournalEntry', 'TxnID' ),
			'JournalEntryRet JournalCreditLine' => 														array( 'JournalEntry_JournalCreditLine', array( 'JournalEntry_TxnID', 'TxnLineID' ) ),
			'JournalEntryRet JournalDebitLine' => 														array( 'JournalEntry_JournalDebitLine', array( 'JournalEntry_TxnID', 'TxnLineID' ) ),
			'JournalEntryRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'PaymentMethodRet' => 																		array( 'PaymentMethod', 'ListID' ),
			'PayrollItemWageRet' => 																	array( 'PayrollItemWage', 'ListID' ),
			'PriceLevelRet' => 																			array( 'PriceLevel', 'ListID' ),
			'PriceLevelRet PriceLevelPerItemRet' => 													array( 'PriceLevel_PriceLevelPerItem', array( 'PriceLevel_ListID', 'Item_ListID' ) ),
			'PurchaseOrderRet' =>																		array( 'PurchaseOrder', 'TxnID' ),
			'PurchaseOrderRet PurchaseOrderLineRet' =>													array( 'PurchaseOrder_PurchaseOrderLine', array( 'PurchaseOrder_TxnID', 'TxnLineID' ) ),
			'PurchaseOrderRet PurchaseOrderLineRet DataExtRet' => 										array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'PurchaseOrderRet PurchaseOrderLineGroupRet' =>												array( 'PurchaseOrder_PurchaseOrderLineGroup', array( 'PurchaseOrder_TxnID', 'TxnLineID' ) ),
			'PurchaseOrderRet PurchaseOrderLineGroupRet DataExtRet' => 									array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet' =>						array( 'PurchaseOrder_PurchaseOrderLineGroup_PurchaseOrderLine', array( 'PurchaseOrder_TxnID', 'PurchaseOrder_PurchaseOrderLineGroup_TxnLineID', 'TxnLineID' ) ),
			'PurchaseOrderRet PurchaseOrderLineGroupRet PurchaseOrderLineRet DataExtRet' => 			array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'PurchaseOrderRet LinkedTxn' => 															array( 'PurchaseOrder_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), 
			'PurchaseOrderRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'ReceivePaymentRet' => 																		array( 'ReceivePayment', 'TxnID' ),  			
			'ReceivePaymentRet AppliedToTxnRet' => 														array( 'ReceivePayment_AppliedToTxn', array( 'ToTxnID', 'FromTxnID' ) ), 
			'ReceivePaymentRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'SalesOrderRet' => 																			array( 'SalesOrder', 'TxnID' ),
			'SalesOrderRet SalesOrderLineRet' => 														array( 'SalesOrder_SalesOrderLine', array( 'SalesOrder_TxnID', 'TxnLineID' ) ),
			'SalesOrderRet SalesOrderLineRet DataExtRet' => 											array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'SalesOrderRet SalesOrderLineGroupRet' => 													array( 'SalesOrder_SalesOrderLineGroup', array( 'SalesOrder_TxnID', 'TxnLineID' ) ),
			'SalesOrderRet SalesOrderLineGroupRet DataExtRet' => 										array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet' => 								array( 'SalesOrder_SalesOrderLineGroup_SalesOrderLine', array( 'SalesOrder_TxnID', 'SalesOrder_SalesOrderLineGroup_TxnLineID', 'TxnLineID' ) ),
			'SalesOrderRet SalesOrderLineGroupRet SalesOrderLineRet DataExtRet' => 						array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'SalesOrderRet LinkedTxn' => 																array( 'SalesOrder_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), 	
			'SalesOrderRet DataExtRet' => 																array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'SalesReceiptRet' =>																		array( 'SalesReceipt', 'TxnID' ),
			'SalesReceiptRet SalesReceiptLineRet' =>													array( 'SalesReceipt_SalesReceiptLine', array( 'SalesReceipt_TxnID', 'TxnLineID' ) ),
			'SalesReceiptRet SalesReceiptLineRet DataExtRet' => 										array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'SalesReceiptRet SalesReceiptLineGroupRet' =>												array( 'SalesReceipt_SalesReceiptLineGroup', array( 'SalesReceipt_TxnID', 'TxnLineID' ) ),
			'SalesReceiptRet SalesReceiptLineGroupRet DataExtRet' => 									array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet' =>							array( 'SalesReceipt_SalesReceiptLineGroup_SalesReceiptLine', array( 'SalesReceipt_TxnID', 'SalesReceipt_SalesReceiptLineGroup_TxnLineID', 'TxnLineID' ) ),
			'SalesReceiptRet SalesReceiptLineGroupRet SalesReceiptLineRet DataExtRet' => 				array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'SalesReceiptRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'SalesRepRet' =>																			array( 'SalesRep', 'ListID' ),
			'SalesTaxCodeRet' =>																		array( 'SalesTaxCode', 'ListID' ),
			'ShipMethodRet' =>																			array( 'ShipMethod', 'ListID' ),
			'StandardTermsRet' => 																		array( 'StandardTerms', 'ListID' ),
			'TimeTrackingRet' => 																		array( 'TimeTracking', 'TxnID' ),  	
			'UnitOfMeasureSetRet' => 																	array( 'UnitOfMeasureSet', 'ListID' ),  	
			'UnitOfMeasureSetRet RelatedUnit' => 														array( 'UnitOfMeasureSet_RelatedUnit', array( 'UnitOfMeasureSet_ListID', 'Name' ) ),  	
			'UnitOfMeasureSetRet DefaultUnit' => 														array( 'UnitOfMeasureSet_DefaultUnit', array( 'UnitOfMeasureSet_ListID', 'UnitUsedFor' ) ),  		
			'VehicleRet' => 																			array( 'Vehicle', 'ListID' ),
			'VehicleMileageRet' => 																		array( 'VehicleMileage', 'TxnID' ), 
			'VendorRet' => 																				array( 'Vendor', 'ListID' ),  
			'VendorRet DataExtRet' => 																	array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'VendorCreditRet' => 																		array( 'VendorCredit', 'TxnID' ),  
			'VendorCreditRet ExpenseLineRet' => 														array( 'VendorCredit_ExpenseLine', array( 'VendorCredit_TxnID', 'TxnLineID' ) ),  
			'VendorCreditRet ItemLineRet' => 															array( 'VendorCredit_ItemLine', array( 'VendorCredit_TxnID', 'TxnLineID' ) ),  
			'VendorCreditRet ItemGroupLineRet' => 														array( 'VendorCredit_ItemGroupLine', array( 'VendorCredit_TxnID', 'TxnLineID' ) ),  
			'VendorCreditRet ItemGroupLineRet ItemLineRet' => 											array( 'VendorCredit_ItemGroupLine_ItemLine', array( 'VendorCredit_TxnID', 'VendorCredit_ItemGroupLine_TxnLineID', 'TxnLineID' ) ),  
			'VendorCreditRet LinkedTxn' => 																array( 'VendorCredit_LinkedTxn', array( 'ToTxnID', 'FromTxnID' ) ), 
			'VendorCreditRet DataExtRet' => 															array( 'DataExt', array( 'EntityType', 'TxnType', 'Entity_ListID', 'Txn_TxnID' ) ),	
			'VendorTypeRet' => 																			array( 'VendorType', 'ListID' ),  
			'WorkersCompCodeRet' => 																	array( 'WorkersCompCode', 'ListID' ),  
				
			);
			
		if ($mode == QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL)
		{
			if (!isset($xml_to_sql[$path_or_tablefield]))
			{
				if (substr($path_or_tablefield, -3, 3) != 'Ret')
				{
					//$path_or_tablefield = substr($path_or_tablefield, 0, -3);
					$path_or_tablefield .= 'Ret';
					
					if (isset($xml_to_sql[$path_or_tablefield]))
					{
						$map = $xml_to_sql[$path_or_tablefield];
						QuickBooks_SQL_Schema::_applyOptions($map, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $options);
					}
				}
			}
			else
			{
				$map = $xml_to_sql[$path_or_tablefield];
				QuickBooks_SQL_Schema::_applyOptions($map, QUICKBOOKS_SQL_SCHEMA_MAP_TO_SQL, $options);
			}
		}
		else
		{
			
		}
		
		return;
	}
Tell the SQL primary key for a given XML path, or the XML path for a given table/field combination

@todo This should support the uppercase/lowercase table/field names option set (->_defaults() a generic method, everything calls it to get default options)

@param string $path_or_tablefield
@param string $mode
@param mixed $map					In SCHEMA_MAP_TO_SQL mode, this is set to a tuple containing the SQL table and SQL field name, in SQL_MAP_TO_SCHEMA mode this is set to the XML path
@return void