1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle
.ActiveRecord
20 /// Defines the values for optimistic locking
23 public enum OptimisticLocking
26 /// do not use optimistic locking
31 /// check the version/timestamp columns
36 /// check the changed columns
47 /// Define the polymorphism options
50 public enum Polymorphism
53 /// Implicit polymorphism
57 /// Explicit polymorphism
63 /// Define the caching options
69 /// Default value, no caching
73 /// Read only cache - use for cases where no write are performed.
81 /// Read write cache with looser semantics.
82 /// Check NHibernate's documentation for the detials.
88 /// Define outer join options
91 public enum OuterJoinEnum
94 /// Let NHibernate decide what to do
102 /// Do not use outer join
108 /// Define the possible fetch option values
110 public enum FetchEnum
113 /// Let NHibernate decide what to do here
117 /// Use a JOIN to load the data
121 /// Use a seperate SELECT statement to load the data
125 /// Use a seperate SELECT statement to load the data, re-running the original query in a subselect
131 /// Defines the cascading behaviour of this association.
134 /// Entities has associations to other objects, this may be an association to a single item (<see cref="BelongsToAttribute" />)
135 /// or an association to a collection (<see cref="HasManyAttribute" />, <see cref="HasManyToAnyAttribute" />).
136 /// At any rate, you are able to tell NHibernate to automatically traverse an entity's associations, and act according
137 /// to the cascade option. For instance, adding an unsaved entity to a collection with <see cref="CascadeEnum.SaveUpdate" />
138 /// cascade will cause it to be saved along with its parent object, without any need for explicit instructions on our side.
140 public enum CascadeEnum
143 /// No cascading. This is the default.
144 /// The cascade should be handled manually.
148 /// Cascade save, update and delete.
149 /// When the object is saved, updated or deleted, the associations will be checked
150 /// and the objects found will also be saved, updated or deleted.
154 /// Cascade save and update.
155 /// When the object is saved or updated, the associations will be checked and any object that requires
156 /// will be saved or updated (including saving or updating the associations in many-to-many scenario).
161 /// When the object is deleted, all the objects in the association will be deleted as well.
167 /// Defines the cascading behaviour of this association.
170 /// Entities has associations to other objects, this may be an association to a single item (<see cref="BelongsToAttribute" />)
171 /// or an association to a collection (<see cref="HasManyAttribute" />, <see cref="HasManyToAnyAttribute" />).
172 /// At any rate, you are able to tell NHibernate to automatically traverse an entity's associations, and act according
173 /// to the cascade option. For instance, adding an unsaved entity to a collection with <see cref="CascadeEnum.SaveUpdate" />
174 /// cascade will cause it to be saved along with its parent object, without any need for explicit instructions on our side.
177 public enum ManyRelationCascadeEnum
180 /// No cascading. This is the default.
181 /// The cascade should be handled manually.
185 /// Cascade save, update and delete.
186 /// When the object is saved, updated or deleted, the associations will be checked
187 /// and the objects found will also be saved, updated or deleted.
191 /// Cascade save and update.
192 /// When the object is saved or updated, the associations will be checked and any object that requires
193 /// will be saved or updated (including saving or updating the associations in many-to-many scenario).
198 /// When the object is deleted, all the objects in the association will be deleted as well.
202 /// Cascade save, update and delete, removing orphan children.
203 /// When an object is saved, updated or deleted, the associations will be checked and all objects found
204 /// will be saved, updated or deleted as well.
205 /// In additional to that, when an object is removed from the association and not associated with another object (orphaned), it will also be deleted.