简体   繁体   中英

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.

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

when i get the address from struts2 tags in jsp page using the below tag.

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

i know in struts2 the action class properties are stored on the 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. Either you enable eager loading or initialize the address object within session itself

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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