1. The accessors are intentionally left unchanged. This is done in order to prevent the loss of any changes you might have done in the public declaration. The complete public declaration (including the accessors for the newly added fields) is generated in the private part of the partial class as commented code at the bottom. You only need to copy it and override the public declarations.
As another approach you can disable the generation of partial classes. This way both the private declaration and the accessors will be generated in a single file that will be always overwritten.
2. Our DataSource control provides you with an option of server side paging. If you however do not want/need to use the DataSource control you can always implement your own way of paging using either Linq or OQL (assuming you do not want to use plain SQL).
Here are two samples:
var result = (from c
where c.Freight < 100
IQuery oqlQuery = scope.GetOqlQuery(
"Select * from OrderExtent"
oqlQuery.MaxResultCount = 10;
IQueryResult result = oqlQuery.Execute();
3. Yes, you are correct. You will need to navigate to the Advanced tab in the reverse mapping wizard. Expand the OrderItems class and select the order field. Check the checkbox for create one-to-many list
. This will create a list of OrderItems in your Order class.
4. When you retrieve an Order object its properties are not loaded until they are needed (accessed). This is called lazy loading. Having that in mind, the collection of OrderItems is not loaded as well. When the first property of the Order class is accessed, the Order class is loaded but none of the OrderItems objects are loaded (assuming that the default fetchplan is in place). When you access the OrderItems collection then all the OrderItems objects that belong to the given order will be retrieved and they will automatically "know" its Order.
the Telerik team