简体   繁体   English

访问struts2标记中的外键列时是否发生数据库命中

[英]database hits occur or not when access foriegn key columns in struts2 tag

I have used struts2 tags for getting action class property values in jsp page.I have a table called employee.In that employee table, address is the foriegn key.I get a employee details in lazy fetcthing and load the values using list. 我使用struts2标签在jsp页面中获取操作类的属性值。我有一个名为employee的表。在该employee表中,address是foriegn键。我在lazy fetcthing中获得了employee的详细信息并使用list加载值。

List<Employee> empList=cr.list();

when i get the address from struts2 tags in jsp page using the below tag. 当我使用以下标记从jsp页面中的struts2标记获取地址时。

<s:property value="address.getDoorno()"/>

i know in struts2 the action class properties are stored on the valuestack. 我知道在struts2中,动作类属性存储在valuestack上。

my doubt is the valuestack stores the proxy object or original object and if stores the proxy object database hit occurs or not,and if original object when value stack converts the proxy object to original object? 我的疑问是值堆栈存储代理对象还是原始对象,是否存储了代理对象数据库命中,是否将值堆栈转换为原始对象时将原始对象转换为原始对象?

Any help will be greatly appreciated!! 任何帮助将不胜感激!!

As you have configured lazy loading struts 2 will store proxy object. 配置了延迟加载后,struts 2将存储代理对象。 Either you enable eager loading or initialize the address object within session itself 您启用即时加载或在会话本身中初始化地址对象

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM