I have the following code snippet using QuickBooks Online java sdk:
final Bill bill = GenerateQuery.createQueryEntity(Bill.class);
final String query = select($(bill)).where($(bill.getDocNumber()).eq("37809")).generate();
final QueryResult result = dataService.executeQuery(query);
final List<? extends IEntity> entities = result.getEntities();
In the log I've checked generated query that looks like this:
SELECT CompanyName.Id.* FROM Vendor WHERE DocNumber = '37809'
OR
SELECT CompanyName.Id.tring.* FROM Vendor WHERE DocNumber = '37809'
It sometimes generates different query, not the same every time. I have not idea what tring is. At the end I get the following exception:
"com.intuit.ipp.exception.FMSException: ERROR CODE:4001,
ERROR MESSAGE:Invalid query, ERROR DETAIL:QueryValidationError: Property DocNumber not found for Entity Vendor
Vendor entity is used in query instead of Bill entity. Obviously there's no DocNumber in Vendor entity, it is in Bill. What is the reason of inproper query generation?
I've tried to recompile whole project, didn't work. If I put this piece of code to other project, it works flawlessly.