title: Typeorm - Transform Response
body: <p>I'm using Typeorm with NestJS, is there a way to pass in a dynamic value into the Column transformer?</p>
  <p>I've got this post entity file:</p>
  <pre><code>export class Post extends EntityBase {
    @PrimaryGeneratedColumn()
    id: number;
  
    @ManyToOne(() =&gt; PostType, (postType) =&gt; postType.id)
    postType: PostType;
  
    @Column()
    name: string;
  
    @Column()
    dateStart: Date;
  
    @Column()
    dateEnd: Date;
  
    @Column({ select: false })
    status: number;
  
    @Column({
      transformer: {
        to(n) {
          return n;
        },
        from(n) {
          return configService.getCDNUrl() + n;
        },
      },
    })
    imageList: string;
  
    @Column()
    slug: string;
  }
  </code></pre>
  <p>I'm waiting to prefix the images with the full CDN URL, currently, this appends the CDN URL correctly as it's a static value so i pull the value from the configservice so i do get <a href="https://mycdn.com/image.jpg" rel="nofollow noreferrer">https://mycdn.com/image.jpg</a></p>
  <p>However my images are stored in folders for each client so what i actually need it <a href="https://mycdn.com/%7B%7BclientId%7D%7D/image.jpg" rel="nofollow noreferrer">https://mycdn.com/{{clientId}}/image.jpg</a> - Each request to the API does contain the clientId, is there a way to pass this information into the entity or repository to transform the response (or we can pick the clientId from postType.clientId) or will have to manually transform it in the service?</p>