ObjectSpaces是将集成在Whidbey中的O/R Mapping组件。

具体参见:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadonet/html/objectspaces.asp

即将release的ObjectSpaces暂时只支持SQL Server 2000 & SQL Server Yukon。

在执行查询的时候,ObjectSpaces使用的是称之为OPath的query string,并且还将支持称之为Span的参数,用于指定是否级联返回一个对象的子对象集合:
“A span is a comma-separated string that identifies related objects that will be returned by the query. Specifying a span value of "Orders" ensures that the Order objects related to any Customer object are returned by the query as well. All orders are automatically packed into the Orders property.”

为了提高性能和节省内存,ObjectSpaces在装载子对象集合的时候采用了Delay Loading的技术。也就是等到在代码中真正需要用到那个对象的时候才去从数据库中加载。
“To improve performance and memory use in parent/child relationships, ObjectSpaces provides a facility known as "delay loading". It works both for one-to-many and one-to-one relationships. The idea is that child objects are loaded in memory and on demand only at the time that they are requested.”

大概看了一下那个文章,可能因为只是first look的缘故,感觉举的例子中的数据结构还是比较简单,感觉功能还不是很强,不足以描述那些有结构复杂的(有嵌套的树形的结构)对象。不过微软应该不会让人失望的,只有等release出来之后才知道这个o/r mapping framework的庐山真面目:)

posted on 2004-06-03 12:11  Laser.NET  阅读(781)  评论(0编辑  收藏  举报
无觅相关文章插件,快速提升流量