Permalink
Browse files

Refactored "attribute" values into multiple layers instead of just

defaults and non-defaults. We've now got three layers: defaults,
conventions, and user-supplied. This distinction allows us to provide
sensible default values which get overwritten by conventions, and
user supplied values that override conventions.
  • Loading branch information...
1 parent ddd15d4 commit f3186cba6182178c01377f7218df21317ca577de @jagregory committed Apr 17, 2011
Showing with 3,155 additions and 11,226 deletions.
  1. +21 −1 src/FluentNHibernate.5.1.ReSharper
  2. +3 −6 src/FluentNHibernate.Specs/Automapping/AutomappingSpecs.ElementCollections.cs
  3. +2 −2 src/FluentNHibernate.Specs/SerializableSpecs.cs
  4. +8 −8 src/FluentNHibernate.Specs/Visitors/BiDirectionalManyToManyPairingVisitorSpecs.cs
  5. +7 −12 src/FluentNHibernate.Testing/AutoMapping/Steps/HasManyStepTests.cs
  6. +0 −38 src/FluentNHibernate.Testing/AutoMapping/Steps/IdentityStepTests.cs
  7. +23 −13 src/FluentNHibernate.Testing/AutoMapping/Steps/VersionStepTests.cs
  8. +18 −10 ...luentNHibernate.Testing/ConventionsTests/AcceptanceCriteria/PropertyAcceptanceCriteriaAnyTests.cs
  9. +6 −6 ...ibernate.Testing/ConventionsTests/AcceptanceCriteria/PropertyAcceptanceCriteriaCollectionTests.cs
  10. +12 −4 ...te.Testing/ConventionsTests/AcceptanceCriteria/PropertyAcceptanceCriteriaEqualComplexTypeTests.cs
  11. +12 −4 ...Testing/ConventionsTests/AcceptanceCriteria/PropertyAcceptanceCriteriaEqualSimpleTypeEvalTests.cs
  12. +12 −6 ...ate.Testing/ConventionsTests/AcceptanceCriteria/PropertyAcceptanceCriteriaEqualSimpleTypeTests.cs
  13. +4 −4 ...te.Testing/ConventionsTests/AcceptanceCriteria/PropertyAcceptanceCriteriaEqualSubPropertyTests.cs
  14. +8 −10 ...bernate.Testing/ConventionsTests/AcceptanceCriteria/PropertyAcceptanceCriteriaInheritanceTests.cs
  15. +23 −7 ...entNHibernate.Testing/ConventionsTests/AcceptanceCriteria/PropertyAcceptanceCriteriaIsAnyTests.cs
  16. +26 −8 ...entNHibernate.Testing/ConventionsTests/AcceptanceCriteria/PropertyAcceptanceCriteriaIsSetTests.cs
  17. +13 −9 src/FluentNHibernate.Testing/ConventionsTests/AcceptanceCriteria/PropertyAcceptanceCriteriaTests.cs
  18. +1 −1 src/FluentNHibernate.Testing/ConventionsTests/ApplyingToModel/IdConventionTests.cs
  19. 0 src/FluentNHibernate.Testing/ConventionsTests/Inspection/{ValueTypes → }/AccessTests.cs
  20. +0 −294 src/FluentNHibernate.Testing/ConventionsTests/Inspection/AnyInspectorMapsToAnyMapping.cs
  21. +0 −99 src/FluentNHibernate.Testing/ConventionsTests/Inspection/CacheInspectorMapsToCacheMapping.cs
  22. 0 src/FluentNHibernate.Testing/ConventionsTests/Inspection/{ValueTypes → }/CascadeTests.cs
  23. +0 −734 src/FluentNHibernate.Testing/ConventionsTests/Inspection/ClassInspectorMapsToClassMapping.cs
  24. +0 −98 ...luentNHibernate.Testing/ConventionsTests/Inspection/CollectionInspectorMapsToCollectionMapping.cs
  25. +0 −272 src/FluentNHibernate.Testing/ConventionsTests/Inspection/ColumnInspectorMapsToColumnMapping.cs
  26. +0 −381 src/FluentNHibernate.Testing/ConventionsTests/Inspection/ComponentInspectorMapsToComponentMapping.cs
  27. +0 −123 ...ate.Testing/ConventionsTests/Inspection/CompositeElementInspectorMapsToCompositeElementMapping.cs
  28. +0 −188 ...entNHibernate.Testing/ConventionsTests/Inspection/CompositeIdInspectorMapsToCompositeIdMapping.cs
  29. +0 −357 ...Hibernate.Testing/ConventionsTests/Inspection/DiscriminatorInspectorMapsToDiscriminatorMapping.cs
  30. +0 −337 ...ate.Testing/ConventionsTests/Inspection/DynamicComponentInspectorMapsToDynamicComponentMapping.cs
  31. +0 −129 src/FluentNHibernate.Testing/ConventionsTests/Inspection/ElementInspectorMapsToElementMapping.cs
  32. 0 src/FluentNHibernate.Testing/ConventionsTests/Inspection/{ValueTypes → }/FetchTests.cs
  33. 0 src/FluentNHibernate.Testing/ConventionsTests/Inspection/{ValueTypes → }/GeneratedTests.cs
  34. +0 −71 src/FluentNHibernate.Testing/ConventionsTests/Inspection/GeneratorInspectorMapsToGeneratorMapping.cs
  35. +0 −144 ...NHibernate.Testing/ConventionsTests/Inspection/HibernateMappingInspectorMapsToHibernateMapping.cs
  36. +0 −382 src/FluentNHibernate.Testing/ConventionsTests/Inspection/IdInspectorMapsToIdMapping.cs
  37. 0 src/FluentNHibernate.Testing/ConventionsTests/Inspection/{ValueTypes → }/IncludeTests.cs
  38. +0 −102 src/FluentNHibernate.Testing/ConventionsTests/Inspection/IndexInspectorMapsToIndexMapping.cs
  39. +0 −117 ...rnate.Testing/ConventionsTests/Inspection/IndexManyToManyInspectorMapsToIndexManyToManyMapping.cs
  40. +0 −295 src/FluentNHibernate.Testing/ConventionsTests/Inspection/JoinInspectorMapsToJoinMapping.cs
  41. +0 −444 ...bernate.Testing/ConventionsTests/Inspection/JoinedSubclassInspectorMapsToJoinedSubclassMapping.cs
  42. +0 −121 src/FluentNHibernate.Testing/ConventionsTests/Inspection/KeyInspectorMapsToKeyMapping.cs
  43. +0 −190 ...tNHibernate.Testing/ConventionsTests/Inspection/KeyManyToOneInspectorMapsToKeyManyToOneMapping.cs
  44. +0 −124 ...entNHibernate.Testing/ConventionsTests/Inspection/KeyPropertyInspectorMapsToKeyPropertyMapping.cs
  45. +0 −233 ...luentNHibernate.Testing/ConventionsTests/Inspection/ManyToManyInspectorMapsToManyToManyMapping.cs
  46. +0 −342 src/FluentNHibernate.Testing/ConventionsTests/Inspection/ManyToOneInspectorMapsToManyToOneMapping.cs
  47. +0 −79 src/FluentNHibernate.Testing/ConventionsTests/Inspection/MetaValueInspectorMapsToMetaValueMapping.cs
  48. 0 src/FluentNHibernate.Testing/ConventionsTests/Inspection/{ValueTypes → }/NotFoundTests.cs
  49. 0 src/FluentNHibernate.Testing/ConventionsTests/Inspection/{ValueTypes → }/OnDeleteTests.cs
  50. +0 −101 src/FluentNHibernate.Testing/ConventionsTests/Inspection/OneToManyInspectorMapsToOneToManyMapping.cs
  51. +0 −217 src/FluentNHibernate.Testing/ConventionsTests/Inspection/OneToOneInspectorMapsToOneToOneMapping.cs
  52. 0 src/FluentNHibernate.Testing/ConventionsTests/Inspection/{ValueTypes → }/OptimisticLockTests.cs
  53. +0 −57 src/FluentNHibernate.Testing/ConventionsTests/Inspection/ParentInspectorMapsToParentMapping.cs
  54. 0 src/FluentNHibernate.Testing/ConventionsTests/Inspection/{ValueTypes → }/PolymorphismTests.cs
  55. +0 −483 src/FluentNHibernate.Testing/ConventionsTests/Inspection/PropertyInspectorMapsToPropertyMapping.cs
  56. 0 src/FluentNHibernate.Testing/ConventionsTests/Inspection/{ValueTypes → }/SchemaActionTests.cs
  57. +0 −398 src/FluentNHibernate.Testing/ConventionsTests/Inspection/SubclassInspectorMapsToSubclassMapping.cs
  58. +0 −379 src/FluentNHibernate.Testing/ConventionsTests/Inspection/VersionInspectorMapsToVersionMapping.cs
  59. +3 −3 src/FluentNHibernate.Testing/ConventionsTests/OptionalAcceptTests.cs
  60. +10 −12 src/FluentNHibernate.Testing/ConventionsTests/RunnableConventionsTests.cs
  61. +0 −2 src/FluentNHibernate.Testing/DomainModel/Mapping/ClassMapXmlCreationTester.cs
  62. +11 −13 src/FluentNHibernate.Testing/DomainModel/Mapping/ComponentPropertyMapTester.cs
  63. +0 −1 src/FluentNHibernate.Testing/DomainModel/Mapping/OneToManyTester.cs
  64. +1 −1 src/FluentNHibernate.Testing/DomainModel/Mapping/OneToOneTester.cs
  65. +37 −49 src/FluentNHibernate.Testing/DomainModel/Mapping/PropertyPartTester.cs
  66. +3 −1 src/FluentNHibernate.Testing/FluentInterfaceTests/BaseModelFixture.cs
  67. +89 −115 src/FluentNHibernate.Testing/FluentInterfaceTests/CustomPersister.cs
  68. +3 −3 src/FluentNHibernate.Testing/FluentInterfaceTests/IdGeneratorTests.cs
  69. +2 −2 ...luentNHibernate.Testing/FluentInterfaceTests/JoinedSubclassMutablePropertyModelGenerationTests.cs
  70. +2 −2 src/FluentNHibernate.Testing/FluentInterfaceTests/JoinedSubclassSubPartModelGenerationTests.cs
  71. +2 −2 src/FluentNHibernate.Testing/FluentInterfaceTests/SubclassMutablePropertyModelGenerationTests.cs
  72. +2 −1 src/FluentNHibernate.Testing/FluentInterfaceTests/SubclassSubPartModelGenerationTests.cs
  73. +13 −47 src/FluentNHibernate.Testing/FluentNHibernate.Testing.csproj
  74. +12 −34 src/FluentNHibernate.Testing/MappingModel/AttributeStoreTester.cs
  75. +31 −25 src/FluentNHibernate.Testing/MappingModel/ClassMappingTester.cs
  76. +0 −44 src/FluentNHibernate.Testing/MappingModel/Defaults/ComponentMappingDefaultsTester.cs
  77. +0 −1 src/FluentNHibernate.Testing/MappingModel/Defaults/PropertyColumnDefaultsTester.cs
  78. +3 −3 src/FluentNHibernate.Testing/MappingModel/HibernateMappingTester.cs
  79. +3 −5 src/FluentNHibernate.Testing/MappingModel/Identity/CompositeIdMappingTester.cs
  80. +4 −4 src/FluentNHibernate.Testing/MappingModel/Output/XmlAnyWriterTester.cs
  81. +7 −7 src/FluentNHibernate.Testing/MappingModel/Output/XmlArrayWriterTester.cs
  82. +6 −6 src/FluentNHibernate.Testing/MappingModel/Output/XmlBagWriterTester.cs
  83. +6 −6 src/FluentNHibernate.Testing/MappingModel/Output/XmlClassWriterTester.cs
  84. +5 −3 src/FluentNHibernate.Testing/MappingModel/Output/XmlCompositeElementWriterTester.cs
  85. +1 −1 src/FluentNHibernate.Testing/MappingModel/Output/XmlDiscriminatorWriterTester.cs
  86. +3 −2 src/FluentNHibernate.Testing/MappingModel/Output/XmlFilterDefinitionWriterTester.cs
  87. +4 −3 src/FluentNHibernate.Testing/MappingModel/Output/XmlFilterWriterTester.cs
  88. +6 −5 src/FluentNHibernate.Testing/MappingModel/Output/XmlIdWriterTester.cs
  89. +1 −1 src/FluentNHibernate.Testing/MappingModel/Output/XmlIndexManyToManyWriterTester.cs
  90. +1 −2 src/FluentNHibernate.Testing/MappingModel/Output/XmlJoinWriterTester.cs
  91. +1 −1 src/FluentNHibernate.Testing/MappingModel/Output/XmlKeyWriterTester.cs
  92. +6 −6 src/FluentNHibernate.Testing/MappingModel/Output/XmlListWriterTester.cs
  93. +1 −1 src/FluentNHibernate.Testing/MappingModel/Output/XmlManyToManyWriterTester.cs
  94. +1 −1 src/FluentNHibernate.Testing/MappingModel/Output/XmlManyToOneWriterTester.cs
  95. +6 −6 src/FluentNHibernate.Testing/MappingModel/Output/XmlMapWriterTester.cs
  96. +1 −1 src/FluentNHibernate.Testing/MappingModel/Output/XmlPropertyWriterTester.cs
  97. +5 −5 src/FluentNHibernate.Testing/MappingModel/Output/XmlSetWriterTester.cs
  98. +1 −1 src/FluentNHibernate.Testing/MappingModel/Output/XmlVersionWriterTester.cs
  99. +52 −56 src/FluentNHibernate.Testing/MappingModel/ReferenceComponentMappingSpecs.cs
  100. +0 −16 src/FluentNHibernate.Testing/ModelTestExtensions.cs
  101. +2 −1 src/FluentNHibernate.Testing/PersistenceModelTests/SeparateSubclassVisitorFixture.cs
  102. +38 −38 src/FluentNHibernate.Testing/Testing/PersistenceSpecificationTester.cs
  103. +2 −2 src/FluentNHibernate.Testing/Testing/PersistenceSpecificationTransactionTest.cs
  104. +21 −19 src/FluentNHibernate.Testing/Testing/XmlWriterTestHelper.cs
  105. +6 −7 src/FluentNHibernate.Testing/Visitors/ComponentColumnPrefixVisitorSpecs.cs
  106. +31 −25 src/FluentNHibernate.Testing/Visitors/ComponentReferenceResolutionVisitorSpecs.cs
  107. +2 −2 src/FluentNHibernate/Automapping/AutoJoinedSubClassPart.cs
  108. +28 −27 src/FluentNHibernate/Automapping/AutoMapper.cs
  109. +11 −13 src/FluentNHibernate/Automapping/AutoMapping.cs
  110. +3 −3 src/FluentNHibernate/Automapping/AutoPersistenceModel.cs
  111. +2 −2 src/FluentNHibernate/Automapping/AutoSubClassPart.cs
  112. +9 −13 src/FluentNHibernate/Automapping/Steps/AutoKeyMapper.cs
  113. +8 −9 src/FluentNHibernate/Automapping/Steps/CollectionStep.cs
  114. +20 −14 src/FluentNHibernate/Automapping/Steps/HasManyToManyStep.cs
  115. +11 −9 src/FluentNHibernate/Automapping/Steps/IdentityStep.cs
  116. +14 −12 src/FluentNHibernate/Automapping/Steps/PropertyStep.cs
  117. +7 −5 src/FluentNHibernate/Automapping/Steps/ReferenceStep.cs
  118. +9 −7 src/FluentNHibernate/Automapping/Steps/SimpleTypeCollectionStep.cs
  119. +14 −13 src/FluentNHibernate/Automapping/Steps/VersionStep.cs
  120. +1 −1 src/FluentNHibernate/Conventions/Inspections/ClassInspector.cs
  121. +0 −4 src/FluentNHibernate/Conventions/Inspections/ColumnInspector.cs
  122. +0 −3 src/FluentNHibernate/Conventions/Inspections/IManyToManyCollectionInspector.cs
  123. +7 −21 src/FluentNHibernate/Conventions/Inspections/JoinInstance.cs
  124. +1 −1 src/FluentNHibernate/Conventions/Inspections/PropertyInspector.cs
  125. +1 −10 src/FluentNHibernate/Conventions/Instances/AnyInstance.cs
  126. +11 −20 src/FluentNHibernate/Conventions/Instances/CacheInstance.cs
  127. +17 −45 src/FluentNHibernate/Conventions/Instances/ClassInstance.cs
  128. +30 −76 src/FluentNHibernate/Conventions/Instances/CollectionInstance.cs
  129. +1 −3 src/FluentNHibernate/Conventions/Instances/ColumnInstance.cs
  130. +8 −21 src/FluentNHibernate/Conventions/Instances/ComponentInstance.cs
  131. +5 −16 src/FluentNHibernate/Conventions/Instances/CompositeIdentityInstance.cs
  132. +7 −16 src/FluentNHibernate/Conventions/Instances/DynamicComponentInstance.cs
  133. +4 −8 src/FluentNHibernate/Conventions/Instances/ElementInstance.cs
  134. +43 −86 src/FluentNHibernate/Conventions/Instances/GeneratorInstance.cs
  135. +6 −25 src/FluentNHibernate/Conventions/Instances/HibernateMappingInstance.cs
  136. +18 −56 src/FluentNHibernate/Conventions/Instances/IdentityInstance.cs
  137. +1 −1 src/FluentNHibernate/Conventions/Instances/IndexInstance.cs
  138. +2 −5 src/FluentNHibernate/Conventions/Instances/IndexManyToManyInstance.cs
  139. +16 −31 src/FluentNHibernate/Conventions/Instances/JoinedSubclassInstance.cs
  140. +4 −7 src/FluentNHibernate/Conventions/Instances/KeyInstance.cs
  141. +5 −20 src/FluentNHibernate/Conventions/Instances/KeyManyToOneInstance.cs
  142. +5 −12 src/FluentNHibernate/Conventions/Instances/KeyPropertyInstance.cs
  143. +4 −9 src/FluentNHibernate/Conventions/Instances/ManyToManyCollectionInstance.cs
  144. +6 −11 src/FluentNHibernate/Conventions/Instances/ManyToManyInstance.cs
  145. +28 −80 src/FluentNHibernate/Conventions/Instances/ManyToOneInstance.cs
  146. +3 −11 src/FluentNHibernate/Conventions/Instances/OneToManyInstance.cs
  147. +14 −43 src/FluentNHibernate/Conventions/Instances/OneToOneInstance.cs
  148. +29 −78 src/FluentNHibernate/Conventions/Instances/PropertyInstance.cs
  149. +9 −19 src/FluentNHibernate/Conventions/Instances/SubclassInstance.cs
  150. +21 −64 src/FluentNHibernate/Conventions/Instances/VersionInstance.cs
  151. +3 −16 src/FluentNHibernate/Conventions/ManyToManyTableNameConvention.cs
  152. +12 −12 src/FluentNHibernate/DummyMethodInfo.cs
  153. +11 −13 src/FluentNHibernate/DummyPropertyInfo.cs
  154. +5 −1 src/FluentNHibernate/FluentNHibernate.csproj
  155. +41 −27 src/FluentNHibernate/Mapping/AnyPart.cs
  156. +13 −13 src/FluentNHibernate/Mapping/CachePart.cs
  157. +39 −40 src/FluentNHibernate/Mapping/ClassMap.cs
  158. +5 −2 src/FluentNHibernate/Mapping/ColumnMappingCollection.cs
  159. +7 −7 src/FluentNHibernate/Mapping/ColumnPart.cs
  160. +5 −5 src/FluentNHibernate/Mapping/ComponentMap.cs
  161. +8 −12 src/FluentNHibernate/Mapping/ComponentPart.cs
  162. +20 −19 src/FluentNHibernate/Mapping/ComponentPartBase.cs
  163. +9 −11 src/FluentNHibernate/Mapping/CompositeElementPart.cs
  164. +29 −21 src/FluentNHibernate/Mapping/CompositeIdentityPart.cs
  165. +28 −27 src/FluentNHibernate/Mapping/DiscriminatorPart.cs
  166. +0 −5 src/FluentNHibernate/Mapping/DynamicComponentPart.cs
  167. +13 −9 src/FluentNHibernate/Mapping/ElementPart.cs
  168. +4 −5 src/FluentNHibernate/Mapping/FilterDefinition.cs
  169. +6 −6 src/FluentNHibernate/Mapping/FilterPart.cs
  170. +5 −2 src/FluentNHibernate/Mapping/GeneratorBuilder.cs
  171. +13 −13 src/FluentNHibernate/Mapping/HibernateMappingPart.cs
  172. +2 −1 src/FluentNHibernate/Mapping/IdentityGenerationStrategyBuilder.cs
  173. +44 −37 src/FluentNHibernate/Mapping/IdentityPart.cs
  174. +4 −5 src/FluentNHibernate/Mapping/ImportPart.cs
  175. +16 −10 src/FluentNHibernate/Mapping/IndexManyToManyPart.cs
  176. +12 −8 src/FluentNHibernate/Mapping/IndexPart.cs
  177. +28 −20 src/FluentNHibernate/Mapping/JoinPart.cs
  178. +26 −23 src/FluentNHibernate/Mapping/JoinedSubClassPart.cs
  179. +7 −7 src/FluentNHibernate/Mapping/KeyManyToOnePart.cs
  180. +8 −5 src/FluentNHibernate/Mapping/KeyPropertyPart.cs
  181. +16 −10 src/FluentNHibernate/Mapping/ListIndexPart.cs
  182. +35 −34 src/FluentNHibernate/Mapping/ManyToManyPart.cs
  183. +49 −53 src/FluentNHibernate/Mapping/ManyToOnePart.cs
  184. +17 −17 src/FluentNHibernate/Mapping/NaturalIdPart.cs
  185. +14 −14 src/FluentNHibernate/Mapping/OneToManyPart.cs
  186. +21 −27 src/FluentNHibernate/Mapping/OneToOnePart.cs
  187. +39 −38 src/FluentNHibernate/Mapping/PropertyPart.cs
  188. +6 −22 src/FluentNHibernate/Mapping/StoredProcedurePart.cs
  189. +15 −14 src/FluentNHibernate/Mapping/SubClassPart.cs
  190. +31 −31 src/FluentNHibernate/Mapping/SubclassMap.cs
  191. +72 −62 src/FluentNHibernate/Mapping/ToManyBase.cs
  192. +4 −4 src/FluentNHibernate/Mapping/TuplizerPart.cs
  193. +40 −31 src/FluentNHibernate/Mapping/VersionPart.cs
  194. +31 −39 src/FluentNHibernate/MappingModel/AnyMapping.cs
  195. +26 −165 src/FluentNHibernate/MappingModel/AttributeStore.cs
  196. +22 −24 src/FluentNHibernate/MappingModel/CacheMapping.cs
  197. +48 −79 src/FluentNHibernate/MappingModel/ClassBased/ClassMapping.cs
  198. +11 −8 src/FluentNHibernate/MappingModel/ClassBased/ClassMappingBase.cs
  199. +24 −37 src/FluentNHibernate/MappingModel/ClassBased/ComponentMapping.cs
  200. +10 −37 src/FluentNHibernate/MappingModel/ClassBased/ComponentMappingBase.cs
  201. +10 −11 src/FluentNHibernate/MappingModel/ClassBased/IComponentMapping.cs
  202. +10 −24 src/FluentNHibernate/MappingModel/ClassBased/ReferenceComponentMapping.cs
  203. +39 −60 src/FluentNHibernate/MappingModel/ClassBased/SubclassMapping.cs
  204. +63 −0 src/FluentNHibernate/MappingModel/Collections/AttributeLayeredValues.cs
  205. +45 −70 src/FluentNHibernate/MappingModel/Collections/CollectionMapping.cs
  206. +21 −22 src/FluentNHibernate/MappingModel/Collections/CompositeElementMapping.cs
  207. +23 −26 src/FluentNHibernate/MappingModel/Collections/ElementMapping.cs
  208. +4 −4 src/FluentNHibernate/MappingModel/Collections/ICollectionRelationshipMapping.cs
  209. +23 −25 src/FluentNHibernate/MappingModel/Collections/IndexManyToManyMapping.cs
  210. +23 −24 src/FluentNHibernate/MappingModel/Collections/IndexMapping.cs
  211. +17 −0 src/FluentNHibernate/MappingModel/Collections/LayeredValues.cs
  212. +32 −47 src/FluentNHibernate/MappingModel/Collections/ManyToManyMapping.cs
  213. +12 −6 src/FluentNHibernate/MappingModel/Collections/NestedCompositeElementMapping.cs
  214. +23 −26 src/FluentNHibernate/MappingModel/Collections/OneToManyMapping.cs
  215. +0 −20 src/FluentNHibernate/MappingModel/ColumnBasedMappingBase.cs
  216. +41 −45 src/FluentNHibernate/MappingModel/ColumnMapping.cs
  217. +20 −8 src/FluentNHibernate/MappingModel/DiscriminatorMapping.cs
  218. +23 −13 src/FluentNHibernate/MappingModel/FilterDefinitionMapping.cs
  219. +18 −8 src/FluentNHibernate/MappingModel/FilterMapping.cs
  220. +30 −37 src/FluentNHibernate/MappingModel/HibernateMapping.cs
  221. +3 −2 src/FluentNHibernate/MappingModel/{IMappingBase.cs → IMapping.cs}
  222. +24 −32 src/FluentNHibernate/MappingModel/Identity/CompositeIdMapping.cs
  223. +18 −18 src/FluentNHibernate/MappingModel/Identity/GeneratorMapping.cs
  224. +1 −1 src/FluentNHibernate/MappingModel/Identity/IIdentityMapping.cs
  225. +22 −10 src/FluentNHibernate/MappingModel/Identity/IdMapping.cs
  226. +25 −31 src/FluentNHibernate/MappingModel/Identity/KeyManyToOneMapping.cs
  227. +22 −25 src/FluentNHibernate/MappingModel/Identity/KeyPropertyMapping.cs
  228. +16 −24 src/FluentNHibernate/MappingModel/ImportMapping.cs
  229. +28 −35 src/FluentNHibernate/MappingModel/JoinMapping.cs
  230. +25 −30 src/FluentNHibernate/MappingModel/KeyMapping.cs
  231. +12 −0 src/FluentNHibernate/MappingModel/Layer.cs
  232. +27 −40 src/FluentNHibernate/MappingModel/ManyToOneMapping.cs
  233. +4 −1 src/FluentNHibernate/MappingModel/MappedMembers.cs
  234. +9 −2 src/FluentNHibernate/MappingModel/MappingBase.cs
  235. +21 −22 src/FluentNHibernate/MappingModel/MetaValueMapping.cs
  236. +8 −16 src/FluentNHibernate/MappingModel/NaturalIdMapping.cs
  237. +29 −38 src/FluentNHibernate/MappingModel/OneToOneMapping.cs
  238. +5 −5 src/FluentNHibernate/MappingModel/Output/BaseXmlComponentWriter.cs
  239. +17 −17 src/FluentNHibernate/MappingModel/Output/CollectionAttributeWriter.cs
  240. +9 −9 src/FluentNHibernate/MappingModel/Output/XmlAnyWriter.cs
  241. +1 −1 src/FluentNHibernate/MappingModel/Output/XmlBagWriter.cs
  242. +2 −2 src/FluentNHibernate/MappingModel/Output/XmlCacheWriter.cs
  243. +20 −20 src/FluentNHibernate/MappingModel/Output/XmlClassWriter.cs
  244. +11 −11 src/FluentNHibernate/MappingModel/Output/XmlColumnWriter.cs
  245. +2 −2 src/FluentNHibernate/MappingModel/Output/XmlComponentWriter.cs
  246. +1 −1 src/FluentNHibernate/MappingModel/Output/XmlCompositeElementWriter.cs
  247. +5 −5 src/FluentNHibernate/MappingModel/Output/XmlCompositeIdWriter.cs
  248. +4 −4 src/FluentNHibernate/MappingModel/Output/XmlDiscriminatorWriter.cs
  249. +2 −2 src/FluentNHibernate/MappingModel/Output/XmlElementWriter.cs
  250. +1 −1 src/FluentNHibernate/MappingModel/Output/XmlGeneratorWriter.cs
  251. +8 −8 src/FluentNHibernate/MappingModel/Output/XmlHibernateMappingWriter.cs
  252. +4 −4 src/FluentNHibernate/MappingModel/Output/XmlIdWriter.cs
  253. +2 −2 src/FluentNHibernate/MappingModel/Output/XmlImportWriter.cs
  254. +3 −3 src/FluentNHibernate/MappingModel/Output/XmlIndexManyToManyWriter.cs
  255. +2 −2 src/FluentNHibernate/MappingModel/Output/XmlIndexWriter.cs
  256. +7 −7 src/FluentNHibernate/MappingModel/Output/XmlJoinWriter.cs
  257. +7 −7 src/FluentNHibernate/MappingModel/Output/XmlKeyManyToOneWriter.cs
  258. +4 −4 src/FluentNHibernate/MappingModel/Output/XmlKeyPropertyWriter.cs
  259. +6 −6 src/FluentNHibernate/MappingModel/Output/XmlKeyWriter.cs
  260. +9 −9 src/FluentNHibernate/MappingModel/Output/XmlManyToManyWriter.cs
  261. +14 −14 src/FluentNHibernate/MappingModel/Output/XmlManyToOneWriter.cs
  262. +2 −2 src/FluentNHibernate/MappingModel/Output/XmlMapWriter.cs
  263. +2 −2 src/FluentNHibernate/MappingModel/Output/XmlMetaValueWriter.cs
  264. +1 −1 src/FluentNHibernate/MappingModel/Output/XmlNaturalIdWriter.cs
  265. +3 −3 src/FluentNHibernate/MappingModel/Output/XmlOneToManyWriter.cs
  266. +10 −10 src/FluentNHibernate/MappingModel/Output/XmlOneToOneWriter.cs
  267. +1 −1 src/FluentNHibernate/MappingModel/Output/XmlParentWriter.cs
  268. +9 −9 src/FluentNHibernate/MappingModel/Output/XmlPropertyWriter.cs
  269. +2 −2 src/FluentNHibernate/MappingModel/Output/XmlSetWriter.cs
  270. +23 −16 src/FluentNHibernate/MappingModel/Output/XmlSubclassWriter.cs
  271. +4 −4 src/FluentNHibernate/MappingModel/Output/XmlTuplizerWriter.cs
  272. +5 −5 src/FluentNHibernate/MappingModel/Output/XmlVersionWriter.cs
  273. +20 −20 src/FluentNHibernate/MappingModel/ParentMapping.cs
  274. +25 −18 src/FluentNHibernate/MappingModel/PropertyMapping.cs
  275. +27 −31 src/FluentNHibernate/MappingModel/StoredProcedureMapping.cs
  276. +21 −25 src/FluentNHibernate/MappingModel/TuplizerMapping.cs
  277. +9 −0 src/FluentNHibernate/MappingModel/TuplizerMode.cs
  278. +21 −10 src/FluentNHibernate/MappingModel/VersionMapping.cs
  279. +3 −5 src/FluentNHibernate/Utils/ExpressionToSql.cs
  280. +1 −1 src/FluentNHibernate/Visitors/ComponentColumnPrefixVisitor.cs
  281. +6 −20 src/FluentNHibernate/Visitors/ManyToManyTableNameVisitor.cs
@@ -187,6 +187,22 @@
<Naming2>
<EventHandlerPatternLong>$object$_On$event$</EventHandlerPatternLong>
<EventHandlerPatternShort>$event$Handler</EventHandlerPatternShort>
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="TypesAndNamespaces" />
+ <PredefinedRule Inspect="True" Prefix="I" Suffix="" Style="AaBb" ElementKind="Interfaces" />
+ <PredefinedRule Inspect="True" Prefix="T" Suffix="" Style="AaBb" ElementKind="TypeParameters" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="MethodPropertyEvent" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="Locals" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="LocalConstants" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="aaBb" ElementKind="Parameters" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PublicFields" />
+ <PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="PrivateInstanceFields" />
+ <PredefinedRule Inspect="True" Prefix="_" Suffix="" Style="aaBb" ElementKind="PrivateStaticFields" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Constants" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateConstants" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="StaticReadonly" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateStaticReadonly" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="EnumMember" />
+ <PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="Other" />
</Naming2>
</VB>
<Web>
@@ -198,7 +214,9 @@
<XML>
<FormatSettings />
</XML>
- <GenerateMemberBody />
+ <GenerateMemberBody>
+ <MethodImplementationKind>ReturnDefaultValue</MethodImplementationKind>
+ </GenerateMemberBody>
<Naming2>
<EventHandlerPatternLong>$object$_On$event$</EventHandlerPatternLong>
<EventHandlerPatternShort>$event$Handler</EventHandlerPatternShort>
@@ -221,6 +239,8 @@
<PredefinedRule Inspect="True" Prefix="" Suffix="" Style="AaBb" ElementKind="PrivateStaticReadonly" />
<UserRule Inspect="False" Prefix="" Suffix="" Style="aa_bb" StaticnessKind="Static, Instance" AccessRight="Private, Protected, ProtectedInternal, Internal, Public" Description="MSpec naming">
<ElementKinds>
+ <Kind Name="TEST_TYPE" />
+ <Kind Name="TEST_MEMBER" />
<Kind Name="Machine.Specifications_Behavior" />
<Kind Name="Machine.Specifications_Context" />
<Kind Name="Machine.Specifications_Specification" />
@@ -1,5 +1,4 @@
-using System;
-using System.Linq;
+using System.Linq;
using FluentNHibernate.Automapping;
using FluentNHibernate.Automapping.Steps;
using FluentNHibernate.MappingModel;
@@ -161,10 +160,8 @@ public abstract class AutoMapOneToManySpec
{
cfg = new TestConfiguration();
step = new HasManyStep(cfg);
- container = new ClassMapping
- {
- Type = FakeMembers.Type
- };
+ container = new ClassMapping();
+ container.Set(x => x.Type, Layer.Defaults, FakeMembers.Type);
};
protected static HasManyStep step;
@@ -11,9 +11,9 @@ namespace FluentNHibernate.Specs
public class for_serialization_to_occur
{
Establish context = () =>
- mapping_types = typeof(IMappingBase).Assembly
+ mapping_types = typeof(IMapping).Assembly
.GetTypes()
- .Where(x => x.HasInterface(typeof(IMappingBase)) && !x.IsInterface);
+ .Where(x => x.HasInterface(typeof(IMapping)) && !x.IsInterface);
Because of = () =>
unserializable_types = mapping_types
@@ -21,7 +21,7 @@ public class when_the_bi_directional_many_to_many_visitor_is_asked_to_pair_two_m
};
Because of = () =>
- visit(members_in_queue, supervisors_in_queue, membership_queues_in_user, supervised_queues_in_user);
+ Visit(members_in_queue, supervisors_in_queue, membership_queues_in_user, supervised_queues_in_user);
It should_call_the_user_defined_func = () =>
udf_was_called.ShouldBeTrue();
@@ -68,7 +68,7 @@ public class when_the_bi_directional_many_to_many_visitor_is_asked_to_pair_two_m
};
Because of = () =>
- ex = Catch.Exception(() => visit(fish_in_queue, chips_in_queue, bacon_in_queue, eggs_in_queue));
+ ex = Catch.Exception(() => Visit(fish_in_queue, chips_in_queue, bacon_in_queue, eggs_in_queue));
It should_not_fail = () =>
ex.ShouldBeNull();
@@ -115,7 +115,7 @@ public class when_the_bi_directional_many_to_many_visitor_is_asked_to_pair_two_m
};
Because of = () =>
- ex = Catch.Exception(() => visit(dsers_in_queue, fsers_in_queue, wueues_in_user, eueues_in_user));
+ ex = Catch.Exception(() => Visit(dsers_in_queue, fsers_in_queue, wueues_in_user, eueues_in_user));
It should_not_fail = () =>
ex.ShouldBeNull();
@@ -161,7 +161,7 @@ public class when_the_bi_directional_many_to_many_visitor_is_asked_to_pair_a_man
};
Because of = () =>
- visit(queues_in_user, users2_in_queue, users_in_queue);
+ Visit(queues_in_user, users2_in_queue, users_in_queue);
It should_call_the_user_defined_func = () =>
udf_was_called.ShouldBeTrue();
@@ -200,7 +200,7 @@ public class when_the_bi_directional_many_to_many_visitor_is_asked_to_pair_two_c
};
Because of = () =>
- visit(users_in_queue, queues_in_user);
+ Visit(users_in_queue, queues_in_user);
It should_call_the_user_defined_func = () =>
udf_was_called.ShouldBeTrue();
@@ -243,13 +243,13 @@ protected static CollectionMapping collection<T>(Expression<Func<T, object>> exp
bag.ContainingEntityType = typeof(T);
bag.Member = member;
- bag.Relationship = new ManyToManyMapping();
- bag.ChildType = member.PropertyType.GetGenericArguments()[0];
+ bag.Set(x => x.Relationship, Layer.Defaults, new ManyToManyMapping());
+ bag.Set(x => x.ChildType, Layer.Defaults, member.PropertyType.GetGenericArguments()[0]);
return bag;
}
- protected static void visit(params CollectionMapping[] mappings)
+ protected static void Visit(params CollectionMapping[] mappings)
{
mappings.Each(visitor.Visit);
visitor.Visit(new HibernateMapping[0]); // simulate end of visit
@@ -3,6 +3,7 @@
using System.Linq.Expressions;
using FluentNHibernate.Automapping;
using FluentNHibernate.Automapping.Steps;
+using FluentNHibernate.MappingModel;
using FluentNHibernate.MappingModel.ClassBased;
using FluentNHibernate.MappingModel.Collections;
using FluentNHibernate.Utils.Reflection;
@@ -51,10 +52,8 @@ public void ShouldntMapEntities()
[Test]
public void ShouldMapListAsBag()
{
- var classMapping = new ClassMapping()
- {
- Type = typeof(PropertyTarget)
- };
+ var classMapping = new ClassMapping();
+ classMapping.Set(x => x.Type, Layer.Defaults, typeof(PropertyTarget));
mapper.Map(classMapping, typeof(PropertyTarget).GetProperty("List").ToMember());
@@ -65,10 +64,8 @@ public void ShouldMapListAsBag()
[Test]
public void ShouldMapSetAsSet()
{
- var classMapping = new ClassMapping()
- {
- Type = typeof(PropertyTarget)
- };
+ var classMapping = new ClassMapping();
+ classMapping.Set(x => x.Type, Layer.Defaults, typeof(PropertyTarget));
mapper.Map(classMapping, typeof(PropertyTarget).GetProperty("Set").ToMember());
@@ -79,10 +76,8 @@ public void ShouldMapSetAsSet()
[Test]
public void ShouldMapHashSetAsSet()
{
- var classMapping = new ClassMapping()
- {
- Type = typeof(PropertyTarget)
- };
+ var classMapping = new ClassMapping();
+ classMapping.Set(x => x.Type, Layer.Defaults, typeof(PropertyTarget));
mapper.Map(classMapping, typeof(PropertyTarget).GetProperty("HashSet").ToMember());
@@ -1,38 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using FluentNHibernate.MappingModel.Identity;
-using NUnit.Framework;
-using FluentNHibernate.Automapping.Steps;
-using FluentNHibernate.Automapping;
-using FluentNHibernate.MappingModel.ClassBased;
-using FluentNHibernate.Utils.Reflection;
-
-namespace FluentNHibernate.Testing.AutoMapping.Steps
-{
- [TestFixture]
- public class IdentityStepTests
- {
- [Test]
- public void IdentityStepShouldProvideAnAccessValueThatIsADefaultOnly()
- {
- IdentityStep step = new IdentityStep(new DefaultAutomappingConfiguration());
-
- var classMapping = new ClassMapping() {Type = typeof(ClassWithIdFieldAndGetter)};
- step.Map(classMapping, ReflectionHelper.GetMember<ClassWithIdFieldAndGetter>(x => x.Id));
-
- var idMapping = (IdMapping) classMapping.Id;
- idMapping.HasValue("Access").ShouldBeTrue();
- idMapping.IsSpecified(x => x.Access).ShouldBeFalse();
- }
-
- private class ClassWithIdFieldAndGetter
- {
-#pragma warning disable 649
- int _id;
-#pragma warning restore 649
- public int Id { get { return _id; } }
- }
- }
-}
@@ -28,7 +28,8 @@ public void ShouldMapByteArray()
[Test]
public void ShouldMapByteArrayAsBinaryBlob()
{
- var mapping = new ClassMapping { Type = typeof(Target) };
+ var mapping = new ClassMapping();
+ mapping.Set(x => x.Type, Layer.Defaults, typeof(Target));
mapper.Map(mapping, typeof(Target).GetProperty("Version").ToMember());
@@ -38,27 +39,30 @@ public void ShouldMapByteArrayAsBinaryBlob()
[Test]
public void ShouldMapByteArrayAsTimestampSqlType()
{
- var mapping = new ClassMapping { Type = typeof(Target) };
+ var mapping = new ClassMapping();
+ mapping.Set(x => x.Type, Layer.Defaults, typeof(Target));
mapper.Map(mapping, typeof(Target).GetProperty("Version").ToMember());
- SpecificationExtensions.ShouldBeTrue(mapping.Version.Columns.All(x => x.SqlType == "timestamp"));
+ mapping.Version.Columns.All(x => x.SqlType == "timestamp").ShouldBeTrue();
}
[Test]
public void ShouldMapByteArrayAsNotNull()
{
- var mapping = new ClassMapping { Type = typeof(Target) };
+ var mapping = new ClassMapping();
+ mapping.Set(x => x.Type, Layer.Defaults, typeof(Target));
mapper.Map(mapping, typeof(Target).GetProperty("Version").ToMember());
- SpecificationExtensions.ShouldBeTrue(mapping.Version.Columns.All(x => x.NotNull == true));
+ mapping.Version.Columns.All(x => x.NotNull).ShouldBeTrue();
}
[Test]
public void ShouldMapByteArrayWithUnsavedValueOfNull()
{
- var mapping = new ClassMapping { Type = typeof(Target) };
+ var mapping = new ClassMapping();
+ mapping.Set(x => x.Type, Layer.Defaults, typeof(Target));
mapper.Map(mapping, typeof(Target).GetProperty("Version").ToMember());
@@ -68,7 +72,8 @@ public void ShouldMapByteArrayWithUnsavedValueOfNull()
[Test]
public void ShouldMapInheritedByteArray()
{
- var mapping = new ClassMapping { Type = typeof(SubTarget) };
+ var mapping = new ClassMapping();
+ mapping.Set(x => x.Type, Layer.Defaults, typeof(SubTarget));
mapper.Map(mapping, typeof(SubTarget).GetProperty("Version").ToMember());
@@ -78,7 +83,8 @@ public void ShouldMapInheritedByteArray()
[Test]
public void ShouldSetContainingEntityType()
{
- var mapping = new ClassMapping { Type = typeof(Target) };
+ var mapping = new ClassMapping();
+ mapping.Set(x => x.Type, Layer.Defaults, typeof(Target));
mapper.Map(mapping, typeof(Target).GetProperty("Version").ToMember());
@@ -114,7 +120,8 @@ public void ShouldMapByteArray()
[Test]
public void ShouldMapByteArrayAsBinaryBlob()
{
- var mapping = new ClassMapping { Type = typeof(Target) };
+ var mapping = new ClassMapping();
+ mapping.Set(x => x.Type, Layer.Defaults, typeof(Target));
mapper.Map(mapping, ReflectionHelper.GetMember<BaseEntityClass>(x => x.Version));
@@ -124,7 +131,8 @@ public void ShouldMapByteArrayAsBinaryBlob()
[Test]
public void ShouldMapByteArrayAsTimestampSqlType()
{
- var mapping = new ClassMapping { Type = typeof(Target) };
+ var mapping = new ClassMapping();
+ mapping.Set(x => x.Type, Layer.Defaults, typeof(Target));
mapper.Map(mapping, ReflectionHelper.GetMember<BaseEntityClass>(x => x.Version));
@@ -134,17 +142,19 @@ public void ShouldMapByteArrayAsTimestampSqlType()
[Test]
public void ShouldMapByteArrayAsNotNull()
{
- var mapping = new ClassMapping { Type = typeof(Target) };
+ var mapping = new ClassMapping();
+ mapping.Set(x => x.Type, Layer.Defaults, typeof(Target));
mapper.Map(mapping, ReflectionHelper.GetMember<BaseEntityClass>(x => x.Version));
- mapping.Version.Columns.All(x => x.NotNull == true).ShouldBeTrue();
+ mapping.Version.Columns.All(x => x.NotNull).ShouldBeTrue();
}
[Test]
public void ShouldMapByteArrayWithUnsavedValueOfNull()
{
- var mapping = new ClassMapping { Type = typeof(Target) };
+ var mapping = new ClassMapping();
+ mapping.Set(x => x.Type, Layer.Defaults, typeof(Target));
mapper.Map(mapping, ReflectionHelper.GetMember<BaseEntityClass>(x => x.Version));
Oops, something went wrong.

0 comments on commit f3186cb

Please sign in to comment.