mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	attributes coming from inheritAttributes are inherited only if the inheritAttributes relation itself is inheritable
This commit is contained in:
		
							parent
							
								
									8fb0de900b
								
							
						
					
					
						commit
						41a6e777ea
					
				| @ -102,10 +102,11 @@ class Note extends Entity { | |||||||
|                 WHERE attributes.isDeleted = 0 |                 WHERE attributes.isDeleted = 0 | ||||||
|                   AND attributes.type = 'relation' |                   AND attributes.type = 'relation' | ||||||
|                   AND attributes.name = 'inheritAttributes' |                   AND attributes.name = 'inheritAttributes' | ||||||
|  |                   AND (attributes.noteId = ? OR attributes.isInheritable = 1) | ||||||
|                 ) |                 ) | ||||||
|             SELECT attributes.* FROM attributes JOIN treeWithAttrs ON attributes.noteId = treeWithAttrs.noteId |             SELECT attributes.* FROM attributes JOIN treeWithAttrs ON attributes.noteId = treeWithAttrs.noteId | ||||||
|             WHERE attributes.isDeleted = 0 AND (attributes.isInheritable = 1 OR attributes.noteId = ?) |             WHERE attributes.isDeleted = 0 AND (attributes.isInheritable = 1 OR attributes.noteId = ?) | ||||||
|             ORDER BY level, noteId, position`, [this.noteId, this.noteId]);
 |             ORDER BY level, noteId, position`, [this.noteId, this.noteId, this.noteId]);
 | ||||||
|         // attributes are ordered so that "closest" attributes are first
 |         // attributes are ordered so that "closest" attributes are first
 | ||||||
|         // we order by noteId so that attributes from same note stay together. Actual noteId ordering doesn't matter.
 |         // we order by noteId so that attributes from same note stay together. Actual noteId ordering doesn't matter.
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 azivner
						azivner