Closed prashant7526 closed 4 years ago
Hello @prashant7526 ,
That's a spec violation and there is nothing MyBatis can do about it.
That constructor makes no sense as it just calls super()
and there are getters and setters for all (?) fields.
Removing the constructor should resolve the compilation error and MyBatis may work fine with the default no-arg constructor.
I'll close this as it's not a MyBatis issue.
@harawata Appreciate your help.
I don't know why this issue got closed? Where is the solution in this case? I didn't ask the question about Java. I want to know, how to work with MyBatis in this case? Or whether in this case mybatis cannot be used?
Here's the solution:
<resultMap>
Oh cool. Thanks. :) You helped me already I used Mybatis Generator so it solved my issue. You are an angle @jeffgbutler :) thanks one day solved my 2 issues.
MyBatis version
3.5.5
Database vendor and version
Postgresql 10
Test case or example project
I have 306 fields in my table (it is an outdated database/table, we already normalize the whole database and created new application but still has to use this table for some times for accounting purpose) when I am creating Pojo in constructor Java doesn't allow more than 255 entries.
Steps to reproduce
` public class TableOne { private String OurFileNo; private Date DateAppraiserSaved; private Date DateSubmitted; private Date DayReceived; private String TimeReceived; private String ClaimTakenBy; private long Adjusterid; private String Adjuster; private long Insurcompid; private String InsuranceCompany; private String CompanyCode; private String InsurerCodeForIndependantAdj; private String ClaimNo; private String PolicyNo; private String StockNo; private String StockExplainWhy; private Date DateOfLoss; private String Owner; private String OwnerAddr; private String HomePhoneNo; private String WorkPhoneNo; private String Ext; private String Insured; private String Vehicle; private String ModelYear; private String Make; private String Model; private String SerialNo; private String OdometerReading; private String VehicleLocation; private String PhoneAtLocation; private String MotorVehicleInspectionNumber; private long Repairerid; private String Repairer; private String Manager; private double LabourRate; private long Appraiserid; private String Appraiser; private boolean TotalLoss; private boolean SuppThirdSentToSupport; private boolean Heavytruck; private boolean VehicleDriveable; private boolean AreTemporaryRepairsFeasible; private boolean LossOfUse; private boolean InRentalVehicle; private boolean Specialtyveh; private String TypeOfLoss; private double AppraisedDamage; private double Betterment; private double TaxAmountDeducted; private double AppearanceAllowance; private double AgreedPrice; private double Deductible; private double FirstSupplementAmount; private double SecondSupplementAmount; private double ThirdSupplementAmount; private Date SuppDateFirst; private Date SuppDateSecond; private Date SuppDateThird; private double InsurerPaysThisAmount; private double ActualCashValue; private double OwnerReceives; private double Hst; private double SalvageValue; private double InsurerFinalCost; private double GarageEstimate; private double SavingsFromUseOfNonOemParts; private String Remarks; private String AdjusterRemarks; private Date DateAppraised; private String TimeInspected; private Date ComputerEntry; private String TimeEntered; private String TimeSubmitted; private String TotalRepairHours; private int NoOfPhotos; private int NoOfPhotosSumm; private String Territory; private String LicenseNo; private String ReasonForDelayOne; private String ReasonForDelayTwo; private String ReasonForDelayThree; private Date ThisAppraisalShouldBeCompletedBy; private boolean PaymentReceived; private boolean InvoiceSent; private double AppraisalFee; private double AutoExpense; private double OfficeExpense; private double PhotoExpense; private double PhotoCost; private double PhoneFax; private double AutoTruckEvaluationReport; private String Attention; private double PleasePayThisAmount; private String BillingRemarks; private String InsuranceAdjustingCompany; private String NotesToAdjuster; private double DeductedTaxes; private String Colour; private Date DateInvoiceSent; private String TimeInvoiceSent; private double ReceivedFirst; private double ReceivedSecond; private double ReceivedThird; private Date FirstReceivedOn; private Date SecondReceivedOn; private Date ThirdReceivedOn; private String FirstCheckNumber; private String SecondCheckNumber; private String ThirdCheckNumber; private boolean Interior; private boolean Roof; private boolean LeftRearCorner; private boolean LeftQuaterPanel; private boolean LRearDoor; private boolean LFrtDoor; private boolean LFender; private boolean LFrtCorner; private boolean FrtCenter; private boolean RFrtCorner; private boolean RFender; private boolean RFrtDoor; private boolean RRearDoor; private boolean RQuaterPanel; private boolean RtRearCorner; private boolean RearCenter; private boolean EngineTrans; private boolean Underbody; private String SpecialHandlingNotes; private Date BidClosingDate; private String Loginnameapprsenttosupport; private String AdjSpecificRequests; private long AssignmentNumber; private double AdditionalExpense; private String AddExpenseDiscription; private String SalvageDescription; private double FederalOrHstTax; private double ProvincialTax; private String Province; private String FederalAndHstRate; private String ProvincialTaxRate; private double InvoiceTaxRate; private double InvoiceTaxAmount; private boolean DriveableNo; private boolean DriveableUnknown; private boolean FortythreeR; private boolean LeasedVehicle; private boolean FirstSentLateReport; private boolean SecondSentLateReport; private boolean ThirdSentLateReport; private Date FirstSentLateDate; private Date SecondSentLateDate; private Date ThirdSentLateDate; private String PlateProvince; private boolean Windshield; private boolean LeftAirBag; private boolean RightAirBag; private double VoidAmtNegative; private String VoidDescriptionNegetive; private double VoidAmtPositive; private String VoidDescriptionPositive; private Date VoidDatePositive; private Date VoidDateNegetive; private String NumOfDoors; private String Salvdesccomments; private boolean WawanesaBilling; private boolean SalvageComplete; private Date DateSuppSecondToSupport; private Date DateSuppThirdToSupport; private boolean Waived; private String EngineSize; private boolean AdpFmr; private boolean DealerQuotes; private long Towingautoid; private String TowingYard; private String TowingPhoneNo; private Date DateOwnerContacted; private String TimeOwnerContacted; private boolean OwnerHospitalOrDeceased; private boolean OwnerCouldNotBeContacted; private String SuppTwoEnteredBy; private boolean SuppTwoSentToSupport; private String SuppThreeEnteredBy; private String AdpRequestNumber; private boolean BrandFormIncluded; private String BrandFormIfNotWhy; private boolean RepNotifiedOfTl; private Date DateRepNotifiedTl; private String RoyalAdditionalComments; private Date DateAppraiserReceivedAssign; private String TimeAppraiserReceivedAssign; private Date DateComplaintTaken; private String TimeComplaintTaken; private Date DateInsurerWasNotified; private String TimeInsurerWasNotified; private String ComplaintComment; private String ComplaintResponseComment; private Date DateComplaintResponded; private String TimeComplaintResponded; private boolean AssignSentToAppr; private String ComplaintBy; private String ComplaintTakenBy; private String TimeSuppTwoSentToSupport; private String SuppEnteredBy; private String TimeSuppThreeSentToSupport; private boolean RvOrMarineCraftVehicle; private boolean EmailConfirmation; private boolean GstRegisteredYes; private boolean GstRegisteredNo; private boolean RbcSameDay; private boolean SettledEconoTl; private boolean DataScanNoShows; private boolean TrailerCharge; private double AutosourceValue; private double AutosourceOwnerReceives; private double AutosourceHst; private double AutosourceSalvageValue; private double AutosourceInsurerFinalCost; private double AutosourceProvTax; private double AutosourceRegCoTax; private double AutosourceAddConsideration; private double AutosourceDeductible; private String AppraiserNum; private boolean ViewAllSentToAdj; private boolean ViewAllFirstSuppSentToAdj; private boolean ViewAllSecondSuppSentToAdj; private boolean ViewAllThirdSuppSentToAdj; private boolean AvivaBillingSent; private boolean AllstateBillingSent; private String UnifundTerritory; private String OfnNoChange; private String ClaimCompletedBy; private boolean ImpactTlNotify; private String EconoCurrentVehLoc; private String EconoPoi; private String EconoAutosourceNum; private String EconoAutosourceVersionNum; private String EconoWhyMultipleAutosourceVer; private String EconoWhyNotSettled; private String EconoSettledWithPerson; private boolean EconoApprovalToRemoveSalvageYes; private boolean EconoApprovalToRemoveSalvageNo; private boolean EconoRequestRemovalOfPersonalItemsYes; private boolean EconoRequestRemovalOfPersonalItemsNo; private boolean EconoRequestOwnershipPapersYes; private boolean EconoRequestOwnershipPapersNo; private boolean EconoAdvisedCheckDeliveryToBrokerYes; private boolean EconoAdvisedCheckDeliveryToBrokerNo; private Date EconoAdjusterNotifiedDate; private String EconoAdjusterNotifiedTime; private boolean EconoAdjusterNotifiedFileCompleteYes; private boolean EconoAdjusterNotifiedFileCompleteNo; private Date EconoDateOfSettlementOffer; private boolean EconoRentalConfirmedYes; private boolean EconoRentalConfirmedNo; private Date EconoRentalReturnDate; private Date InvoiceAmendDate; private String InvoiceAmendDesc; private String InspectionLocation; private String EconoRemarks; private boolean Kms; private boolean Miles; private String VehLocAddress; private String VehLocCity; private double CaaAcvRangeLow; private double CaaAcvRangeHigh; private boolean IsAutosourceValuation; private boolean IsOtherSourceValuation; private String ExteriorCondition; private String InteriorCondition; private String MechanicalCondition; private String CaaOtherNotes; private String DescribeOtherSource; private boolean WasInvoiced; private boolean PrivateNoPay; private boolean PrivateNoPayVerify; private Date PayOnItinerary; private boolean VoidedToZero; private double VoidPlusTaxes; private Date VoidPlusTaxDate; private double VoidMinusTaxes; private Date VoidMinusTaxDate; private boolean CancelledClaim; private String CancelExplain; private boolean PayFlag; private boolean LeftMessage; private boolean UnifundTl35; private boolean RbcImpact; private boolean Specialwaschosen; private boolean Heavywaschosen; private boolean Appraisersenttosupport; private double Sales; private boolean Supplementsenttosupport; private Date Datesuppsenttosupport; private String Timesuppsenttosupport; private boolean Discounted; private double DiscountedFee; private boolean Wop; private double BillableKmsAmount; private double Surcharge; private boolean OnHold; private boolean Useassignno; private boolean AdditionalTwentyfive; private boolean BonusTwentyfour; private boolean Isspecial; private double InterestOnCompany;
} `
Expected result
Actual result
Description Resource Path Location Type Too many parameters, parameter DataScanNoShows is exceeding the limit of 255 words eligible for method parameters TableOne.java line 528 Java Problem
How to solve this? Or how I can use myBatis in this situation?