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的廬山真面目:)