mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 00:05:50 +01:00
server-ts: Port services/notes & hidden_subtree
This commit is contained in:
@@ -104,13 +104,14 @@ abstract class AbstractBeccaEntity<T extends AbstractBeccaEntity<T>> {
|
||||
/**
|
||||
* Saves entity - executes SQL, but doesn't commit the transaction on its own
|
||||
*/
|
||||
save(): this {
|
||||
// FIXME: opts not used but called a few times, maybe should be used by derived classes or passed to beforeSaving.
|
||||
save(opts?: {}): this {
|
||||
const constructorData = (this.constructor as unknown as ConstructorData<T>);
|
||||
const entityName = constructorData.entityName;
|
||||
const primaryKeyName = constructorData.primaryKeyName;
|
||||
|
||||
const isNewEntity = !(this as any)[primaryKeyName];
|
||||
|
||||
|
||||
this.beforeSaving();
|
||||
|
||||
const pojo = this.getPojoToSave();
|
||||
|
||||
Reference in New Issue
Block a user