tailieunhanh - Lập trình Wrox Professional Xcode 3 cho Mac OS part 42

Thêm Fetch yêu cầu Lấy yêu cầu chỉ đơn giản là predefi vị ned. ứng dụng của bạn có thể sử dụng chúng trong nhiều cách khác nhau. Khi bạn thêm một yêu cầu tìm nạp, danh sách tài sản thay đổi màn hình hiển thị các thuộc tính thường xuyên để niêm yết chỉ lấy yêu cầu. Để chuyển đổi giữa hai, chọn xem bạn muốn sử dụng tam giác công bố ở dưới cùng của danh sách tài sản. | 318 CHAPTER 15 DATA MODELING O MiskatonicUniversity A i Q Department i Entity Abs Class Property Kind Type or Destination Class NSManagedObject Department NSManagedObject Faculty NSManagedObject classes Relationship Class head Relationship Faculty name Attribute String Member Q NSManagedObject Person 0 NSManagedObject I seniorStudents Fetched Student i Student NSManagedObject Member T Attributes universitylD T Relationships Fetched Property Add Attribute Add Relationship Add Fetch Request Add Fetched FIGURE 15-6 Adding Fetch Requests Fetch requests are simply predefined predicates. Your application can use them in a variety of ways. When you add a fetch request the property list display changes from displaying regular properties to listing only fetch requests. To switch between two select the desired view using the disclosure triangle at the bottom of the properties list. See the Data Model Browser section for more details. DATA MODELING INTERFACE The interface used by data modeling is so similar to the interface used for class modeling that it would be a waste to reiterate it all here. Instead this section just points out the differences between class modeling and data modeling. Before reading this section you should familiarize yourself with the class modeling interface if you have not already done so. Class modeling was described in detail in Chapter 14. Data Model Browser The data model browser lists the entities on the left the entity properties in the middle and the details pane on the right as shown in Figure 15-7. FIGURE 15-7 Download at Data Modeling Interface 319 Selecting an entity in the Entity list displays the properties or fetch requests in the center list. Selecting multiple entities displays a combined list of all properties of the selected entities. The use of the and - buttons has already been described in the Creating Properties section. The disclosure triangles .