1 // Copyright 2004-2007 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
127 /// Defines the cascading behaviour of this association.
130 /// Entities has associations to other objects, this may be an association to a single item (<see cref="BelongsToAttribute" />)
131 /// or an association to a collection (<see cref="HasManyAttribute" />, <see cref="HasManyToAnyAttribute" />).
132 /// At any rate, you are able to tell NHibernate to automatically traverse an entity's associations, and act according
133 /// to the cascade option. For instance, adding an unsaved entity to a collection with <see cref="CascadeEnum.SaveUpdate" />
134 /// cascade will cause it to be saved along with its parent object, without any need for explicit instructions on our side.
136 public enum CascadeEnum
139 /// No cascading. This is the default.
140 /// The cascade should be handled manually.
144 /// Cascade save, update and delete.
145 /// When the object is saved, updated or deleted, the associations will be checked
146 /// and the objects found will also be saved, updated or deleted.
150 /// Cascade save and update.
151 /// When the object is saved or updated, the associations will be checked and any object that requires
152 /// will be saved or updated (including saving or updating the associations in many-to-many scenario).
157 /// When the object is deleted, all the objects in the association will be deleted as well.
163 /// Defines the cascading behaviour of this association.
166 /// Entities has associations to other objects, this may be an association to a single item (<see cref="BelongsToAttribute" />)
167 /// or an association to a collection (<see cref="HasManyAttribute" />, <see cref="HasManyToAnyAttribute" />).
168 /// At any rate, you are able to tell NHibernate to automatically traverse an entity's associations, and act according
169 /// to the cascade option. For instance, adding an unsaved entity to a collection with <see cref="CascadeEnum.SaveUpdate" />
170 /// cascade will cause it to be saved along with its parent object, without any need for explicit instructions on our side.
173 public enum ManyRelationCascadeEnum
176 /// No cascading. This is the default.
177 /// The cascade should be handled manually.
181 /// Cascade save, update and delete.
182 /// When the object is saved, updated or deleted, the associations will be checked
183 /// and the objects found will also be saved, updated or deleted.
187 /// Cascade save and update.
188 /// When the object is saved or updated, the associations will be checked and any object that requires
189 /// will be saved or updated (including saving or updating the associations in many-to-many scenario).
194 /// When the object is deleted, all the objects in the association will be deleted as well.
198 /// Cascade save, update and delete, removing orphan children.
199 /// When an object is saved, updated or deleted, the associations will be checked and all objects found
200 /// will be saved, updated or deleted as well.
201 /// In additional to that, when an object is removed from the association and not associated with another object (orphaned), it will also be deleted.