Created
May 31, 2019 14:36
-
-
Save jtushman/3a295f6407abf88293ba927b915867b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@EntityRepository(Member) | |
export class MemberRepository extends Repository<Member> { | |
public async findOrCreate(user: User, account: Account) { | |
// ?? How do I get access to the connection ?? | |
const notebookRepo = connection.getRepository(Notebook); | |
// do stuff with notebookRepo | |
// then | |
const member = new Member(); | |
member.name = 'asdfadsf' | |
this.save(member) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment