nestjs-express-cassandra icon indicating copy to clipboard operation
nestjs-express-cassandra copied to clipboard

Model Assocations Example?

Open tskweres opened this issue 5 years ago • 1 comments

Are there any examples of how to use the ORM for model assocations?

For example with TypeORM there's a decorator:

@OneToMany(type => Photo, photo => photo.user)
  photos: Photo[];

How might I do that with this package?

Thanks!

tskweres avatar Mar 17 '20 03:03 tskweres

You can use UserDenifeType. You have to provide UDT definition in connection object. Here is an example. Currently this module does not support model assocations like TypeOrm.

ifaim avatar Mar 17 '20 11:03 ifaim