date notes are now created with template relations

This commit is contained in:
zadam
2019-09-07 21:40:18 +02:00
parent 3bf8546d51
commit 45ee959c11
4 changed files with 39 additions and 3 deletions

View File

@@ -195,6 +195,8 @@ class Note extends Entity {
/**
* @returns {Promise<Attribute[]>} attributes belonging to this specific note (excludes inherited attributes)
*
* This method can be significantly faster than the getAttributes()
*/
async getOwnedAttributes(type, name) {
let query = `SELECT * FROM attributes WHERE isDeleted = 0 AND noteId = ?`;
@@ -215,6 +217,8 @@ class Note extends Entity {
/**
* @returns {Promise<Attribute>} attribute belonging to this specific note (excludes inherited attributes)
*
* This method can be significantly faster than the getAttribute()
*/
async getOwnedAttribute(type, name) {
const attrs = await this.getOwnedAttributes(type, name);