Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Banashek
    @Banashek
    hmm it looks like select just seems to be broken for me. even if I call it with any sort of parameter, it will generate a valid query, but .getMany() will return 0 results. copy and pasting the query into psql shows valid output however
    ah it looks like since because I'm selecting a subset of the original entity's properties, that getMany() declares the results a failure. using getManyRaw() with the subset of properties seems to work fine.
    Banashek
    @Banashek
    now I'm wondering if there is a way to specify the type for getRawMany(). I see it's defined as a generic here, but I'm not sure if there is a way to call something like getRawMany<UserVM>()
    Dinu-Iulian Popovici
    @popovicidinu
    Hi all. Quick question about .update(). If I have an entity with multiple relationships to other entities, if I perform an update, are the related objects "preloaded" from the database and update if required? I'm basically receiving a JSON with all the details, and the JSON is mapped directly to the object. Unfortunately I get ER_DUP_ENTRY: Duplicate entry ... for key ... .
    Carlos Esteban Lopez Jaramillo
    @luchillo17
    Hi there, anyone knows if i can extract or introspect the relations in any way? only need the name.
    Sergey Orlov
    @apologetics
    repository. metadata. relations
    Carlos Esteban Lopez Jaramillo
    @luchillo17
    Omg i was getting it from the global variable used by TypeORM
    cvhberger
    @cvhberger
    Hi. Column names are at the moment in camel case (using the alpha version). How can I set it to snake case?
    (found something with naming strategy, but couldnt find out how to use it actually)
    @pleerock
    cvhberger
    @cvhberger
    Is it possible that entities/tables are named as plural in database? eg class User -> Table: users
    Jack Murphy
    @rightisleft
    Does the stable version support the bytea column type for postgres?
    Jack Murphy
    @rightisleft
    i get { DataTypeNotSupportedByDriverError: Specified type (bytea) is not supported by Postgres driver.
    but it looks like that might be alpha 35 and im running 0.11
    Umed Khudoiberdiev
    @pleerock

    Is it possible that entities/tables are named as plural in database? eg class User -> Table: users

    no. Do that manually

    Hi. Column names are at the moment in camel case (using the alpha version). How can I set it to snake case?

    you can set column name in decorator property, e.g. @Column({ name: “some_thing" }). Naming strategies arent completely finished functionality so I don’t recommend you to use it yet. But you can try if you want

    @rightisleft yeah u need to update to the latest
    cvhberger
    @cvhberger
    @pleerock Thank you
    cvhberger
    @cvhberger
    @pleerock As my application is modular, there it is difficult to provide an array of entities while connecting to the DB. Is it possible to add entities later? eg a method of the connection object?
    Umed Khudoiberdiev
    @pleerock
    why it is?
    just provide directory then
    entities: [“modules/**/entity/*.js”]
    cvhberger
    @cvhberger
    Yes, I'll trie that. Thanks.
    Matthias Posch
    @mattposch
    @pleerock writing to you regarding typeorm/typeorm#1052, what's your preferred communication channel, should I create github issues or write here?
    Umed Khudoiberdiev
    @pleerock
    if its not a chat but an issue then always post it on github
    btw guys who still don’t know this is very old typeorm channel
    new one is here
    vipswelt
    @vipswelt

    getting error as follow while writing many to many relationship in typeORM

    ERROR in Error: TypeError: Cannot read property 'kind' of undefined

    image.png
    Nikolay Osaulenko
    @icewind

    @pleerock Is there any way to pass additional parameters for Postgres connection? I need to set statement_timeout which is supported by node-postgres https://node-postgres.com/api/client I'm trying to set in in extra object but with no luck

    extra: {
        statement_timeout: 1 // Test
      }

    And then await connection.entityManager.query('SHOW statement_timeout') shows me [ anonymous { statement_timeout: '0' } ] which is default value

    vipswelt
    @vipswelt
    ?
    Brazen Intellect
    @BrazenIntellect_twitter
    Hello all, I was trying to connect to mssql via msnodesqlv8 instead of tedious so that I can use integrated windows authentication
    but I am lost trying to specify msnodesqlv8 as the driver for typeorm
    My connection option currently looks like following
    {
    type: "mssql",
    host: "localhost",
    port: 63667,
    database: "NodeTypeOrm",
    extra: {
    driver: 'msnodesqlv8',
    trustedConnection: true
    },
    options: {
    useUTC: true,
    }
    }
    @pleerock could it be an issue with extra param ?
    Joel
    @HipsterZipster
    Hi All. Big fan of typeorm. I was just reading the docs around logging and wanted to know what's the easiest way to log to both console AND to a file? Out of the box it seems like just one or other, but is there a quick way to use both of the built in loggers through a custom logger?
    Umed Khudoiberdiev
    @pleerock
    @HipsterZipster no, there is not. U can implement your own logger and delegate calls to both loggers as easiest way to achieve it
    btw its an old channel, please use a new one
    Kyle Galvin
    @KyleGalvin
    Has anyone had success integrating odata filter queries with typeorm? The closest I've found is an openql integration plugin, but I'm partial to odata
    iyatomi takehiro
    @umegaya

    hi, thanks for creating TypeORM, it saves my life a lot. I try to build my own package with following instruction at https://github.com/typeorm/typeorm/blob/master/DEVELOPER.md

    but following error happens. I use gulp 3.9.1, node 10.8.0, npm 6.3.0 any ideas?

    $ npm run package
    
    > typeorm@0.2.7 package /Users/iyatomi/Documents/umegaya/typeorm
    > gulp package
    
    [10:17:29] Requiring external module ts-node/register
    [10:17:30] Using gulpfile ~/Documents/umegaya/typeorm/gulpfile.ts
    [10:17:30] Task 'package' is not in your gulpfile
    [10:17:30] Please check the documentation for proper gulpfile formatting
    Mohit Srivastava
    @mohyt
    I am using the typeORM as it supports ValueTransformer
    Though when I use the custom type (in this case Long) in the where clause, the sql query looks like this
    query: SELECT LongType.longValues AS LongType_longValues, LongType.longValue AS LongType_longValue, LongType.id AS LongType_id FROM long_type LongType WHERE LongType.longValue = ? -- PARAMETERS: ["[object Object]"]
    Any idea how to make sure that for custom type the parameters gets converted properly?
    Umed Khudoiberdiev
    @pleerock
    GUYS PLEASE USE SLACK FOR QUESTIONS
    dc
    @dcworldwide
    I have an issue with records mysteriously being deleted. No one in my code do i delete rows from this table. I only call save() to create/update. Is it possible that typeorm may have a case that would cause a record to be deleted on save()? Using typeorm 0.2.7