@Preload 做什么(Jira 活动对象)?
What does @Preload do (Jira Active Objects)?
我使用活动对象来持久化数据。这个注释到底做了什么?
P.S。我找到了这个描述 (https://ecosystem.atlassian.net/browse/AO-486):
We hit the problem several times where AO will load each field of an object by a separate SQL query:
https://jira.atlassian.com/browse/CONFDEV-21100
https://jira.atlassian.com/browse/CONFDEV-21206
It can be bypassed with @Preload annotation on a class but preloading is not a default behaviour. Obviously not preload introduces a big performance hit when client code needs more than one attribute. I would imagine preloading would be a sensible default given that it would cause very little overhead
"@Preload" 用于预先加载实体的所有字段。默认情况下,行为是仅热切地加载 ID 字段并延迟加载实体中的其他字段。
我使用活动对象来持久化数据。这个注释到底做了什么?
P.S。我找到了这个描述 (https://ecosystem.atlassian.net/browse/AO-486):
We hit the problem several times where AO will load each field of an object by a separate SQL query: https://jira.atlassian.com/browse/CONFDEV-21100 https://jira.atlassian.com/browse/CONFDEV-21206 It can be bypassed with @Preload annotation on a class but preloading is not a default behaviour. Obviously not preload introduces a big performance hit when client code needs more than one attribute. I would imagine preloading would be a sensible default given that it would cause very little overhead
"@Preload" 用于预先加载实体的所有字段。默认情况下,行为是仅热切地加载 ID 字段并延迟加载实体中的其他字段。