Search Options
close
Search the following clips:
All Clips
Sign Up
Install
Learn More
Login
load and find
flyincloud
follow
0
12-7-2008 9:31 PM
41 views
tags:
hibernate
Add a Comment
Login
to Comment. Not a member yet?
Sign up
Today's Top Clips
My response to McAfee about Clipmarks
Happy New Year
Honey, I've set the kids on fire...
It's Not Socialism, It's Communism
Pictures of the year 2009: crop circles, UFO sightings, ghosts and unexplained phenomena
More on ClimateGate
Woman Annoyed over Cat
Virgin Girls Raped Before Execution in Iran
Amazing Clouds
Ted Nugent may be the last sane American
visit the
Top Clips page
View the Top Clips from
December 7, 2008
Embed This Clip In Your Site...
<div style="margin: 12px 0px; font-family: arial; color: #333333; background: #ffffff; border: solid 4px #e5e5e5; width: 100%; clear: left;"><div class="CM_CTB_Content_Wrap" style="margin: 0px; padding: 0px;background-color: #ffffff;"><div style="border-bottom: solid 1px #dcdcdc; white-space: nowrap; margin-bottom: 8px; background-color: #eeeeee ;background-image: url(http://clipmarks.com/images/source-bg.gif); background-repeat: repeat-x; height: 24px; line-height: 24px; vertical-align: middle; padding-bottom: 4px; color: #666666; font-size: 10px;" ><a href="http://clipmarks.com/clip-to-blog/" title="see clips that are hot right now"><img src="http://content.clipmarks.com/blog_embed/a7b31156-64b2-467a-97f6-96b5f521fae8/DCF85F5E-9D02-4F9A-A5F8-FBD3C5E27061/" alt="" width="19" height="19" border="0" style="vertical-align: middle; margin: 0px 4px; display: inline; border: none; float:none;" /></a>clipped from <a title="http://topic.csdn.net/u/20070406/10/4d714df1-8092-4501-90b0-8ea53c2d91d1.html" href="http://topic.csdn.net/u/20070406/10/4d714df1-8092-4501-90b0-8ea53c2d91d1.html" style="font-size: 11px;">topic.csdn.net</a></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://topic.csdn.net/u/20070406/10/4d714df1-8092-4501-90b0-8ea53c2d91d1.html"><table background="undefined" bgcolor=""><tr><TD class="content" csdnid="replyBody" name="reply_body" id="reply47152985_body"><DIV>hibernate中session.find/load方法都能通过指定实体类名和id从数据库中读取指定的记录,并且返回与之对映的实体对象。但是它们也有很大的区别 ,find()和load()方法在执行检索时的区别: </DIV> <BR /><DIV> 1.find()在类检索级别时总是执行立即检索而且如果检索不到相关的对象的话会返回null,load()方法则会抛出一个ObjectNotException </DIV> <BR /><DIV> 2.load()方法可返回一个实体代理类类型,而find()方法直接返回的是实体类对象。 </DIV> <BR /><DIV> 3.load()方法可以充分利用内部缓存和二级缓存,而find()方法会忽略二级缓存,若内部缓存没有查询到会到数据库中去查询。 </DIV> <BR /> </TD></tr></table></blockquote></div><div style="margin: 0px 6px 6px 4px;"><table style="font-size: 11px;border-spacing: 0px;padding: 0px;" cellpadding="0" cellspacing="0" width="100%"><tr><td style="background:transparent;border-width:0px;padding:0px;"> </td><td align="right" style="background:transparent;border-width:0px;padding:0px;width:107px" width="107"><a href="http://clipmarks.com/share/DCF85F5E-9D02-4F9A-A5F8-FBD3C5E27061/blog/" title="blog or email this clip"><img src="http://content8.clipmarks.com/images/c2b-foot.png" border="0" alt="blog it" width="107" height="17" style="border-width:0px;padding:0px;margin:0px;" /></a></td></tr></table></div></div>
New from the makers of Clipmarks:
Amplify.com - Don't just share the news...Amplify it!
Clipmarks
Home
New Clips
Top Clips
Dashboard
Popular Topics
News
Life
Science
Technology
Entertainment
Get Started
Sign Up
Install Clipping Tool
How Clipping Works
Clip-to-Blog™
ClipSearch
Tools and Resources
FAQ
ClipWeek
Top Clippers
Top Tags
Site Map
About Clipmarks
About Us
Contact
Copyright
Privacy
EULA
OK