getOne() method looks not LIMIT query
See original GitHub issueHi … again here.
I’m using your lib and it’s great!!.. but just one quick doubt …
I’m doing a query like:
const query = await this._accountRepository
.getOne()
.where(xx => xx.sfid)
.isNotNull();
Not it works and return a single object … BUT if i enable the logs of the query … i can see this:
SELECT "entity"."lastname" AS "entity_lastname", "entity"."attivo__c" AS "entity_attivo__c", "entity"."personhasoptedoutofemail" AS "entity_personhasoptedoutofemail", "entity"."id_account_18__c" AS "entity_id_account_18__c", "entity"."sesso__c" AS "entity_sesso__c", "entity"."personcontactid" AS "entity_personcontactid", "entity"."recordtypeid" AS "entity_recordtypeid", "entity"."consenso_marketing__c" AS "entity_consenso_marketing__c", "entity"."personemail" AS "entity_personemail", "entity"."codice_fiscale__c" AS "entity_codice_fiscale__c", "entity"."consenso_marketing_email__c" AS "entity_consenso_marketing_email__c", "entity"."consenso_marketing_tel__c" AS "entity_consenso_marketing_tel__c", "entity"."name" AS "entity_name", "entity"."stato_commerciale__c" AS "entity_stato_commerciale__c", "entity"."prossimo_compleanno__c" AS "entity_prossimo_compleanno__c", "entity"."consenso_marketing_sms__c" AS "entity_consenso_marketing_sms__c", "entity"."has_whatsapp__c" AS "entity_has_whatsapp__c", "entity"."phone" AS "entity_phone", "entity"."altra_email__c" AS "entity_altra_email__c", "entity"."ownerid" AS "entity_ownerid", "entity"."ispersonaccount" AS "entity_ispersonaccount", "entity"."isdeleted" AS "entity_isdeleted", "entity"."data_scadenza_consenso_mktg__c" AS "entity_data_scadenza_consenso_mktg__c", "entity"."systemmodstamp" AS "entity_systemmodstamp", "entity"."persondonotcall" AS "entity_persondonotcall", "entity"."eta__c" AS "entity_eta__c", "entity"."alert_truffa__c" AS "entity_alert_truffa__c", "entity"."createddate" AS "entity_createddate", "entity"."personmobilephone" AS "entity_personmobilephone", "entity"."personbirthdate" AS "entity_personbirthdate", "entity"."salutation" AS "entity_salutation", "entity"."professione__c" AS "entity_professione__c", "entity"."tipo_db__c" AS "entity_tipo_db__c", "entity"."personhomephone" AS "entity_personhomephone", "entity"."firstname" AS "entity_firstname", "entity"."consenso_trattamento_dati__c" AS "entity_consenso_trattamento_dati__c", "entity"."id_anagrafica__c" AS "entity_id_anagrafica__c", "entity"."sfid" AS "entity_sfid", "entity"."id" AS "entity_id", "entity"."_hc_lastop" AS "entity__hc_lastop", "entity"."_hc_err" AS "entity__hc_err", "entity"."id_contatto_18__pc" AS "entity_id_contatto_18__pc" FROM "salesforce"."account" "entity" WHERE "entity"."sfid" IS NOT NULL
As you can see the select query looks like NOT be LIMITED to one record … (for example having LIMIT 1 at the end ) … so i ask if is possible that the limit is done in the memory ONCE the query as been hitted on the DB and has returned all records
Really thnx!!!
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
YEs … it’s very clear now … and the lib is not so complicated … i know do a ORM linq style (like EF) i’s not so easy …and you do a GREAT job… really thnx for your time and explanation!!
Terribly sorry for the long period of inactivity on this.
I agree with @ljobse - this seems like a problem on TypeORM’s end in one way or another. I’m going to go ahead and close this one.