-
Notifications
You must be signed in to change notification settings - Fork 21
/
Changes.txt
895 lines (586 loc) · 33.7 KB
/
Changes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
3.0
===
- Breaking Change: Now AsQueryable and other Ling based queries needs an open/registered Session Scope.
3.0 RC (2011-03-14)
===
- Updated NHibernate to to 3.1.0 ga
- Updated NHibernate.Search to NH3 compatible release
- Updated Lucene.net to 2.9.2
- Added the support for Field Camelcase Underscore (AR-296)
- Lazy loading for blob properties
- Foreign Key for HasAndBelongsToMany (AR-288)
- Added support for scope less lazy loading (AR-297). Very usefull for desktop applications.
3.0 beta (2010-12-10)
===
- Updated Castle Validator to 2.5.0
- Updated NHibernate to to 3.0 ga
- Updated Castle Core to 2.5.2 (Includes DynamicProxy)
- Implemented support for NHibernate Discriminator Formula (AR-166)
- Optimistic Lock Support(AR-290)
- Support for NET40 Client Profile (AR-289)
- Included NET40 and NET40 CP binaries on the release package
- Merged the Castle.ActiveRecord.Linq into the Castle.ActiveRecord project. (Out of the box LINQ support)
- Fixed: SaveCopyAndFlush() method in ActiveRecordMediator.cs returns null, but should return object (AR-282)
- Fixed: Formula BUG on property in ActiveRecord with NHibernate 3 (AR-293)
- Breaking: Now the SessionScopeWebModule, HybridWebThreadScopeInfo and WebThreadScopeInfo were moved to the Castle.ActiveRecord.Web assembly.
2.1
===
- Updated Castle Validator to 1.1.1
- Updated NHibernate to to 2.1.4
- Updated Castle Core to 1.2
- Updated Castle DynamicProcy to 2.2
- Added support for NHibernate's new access methods "readonly" and "backfield".
- Added shorthand configuration: It is now possible to use
<activerecord>
<config db="MsSqlServer2005" csn="MyConnectionStringName"/>
</activerecord>
to get default configurations for different DBs (Sql Server, SQLite, Oracle, MySql and others)
- Added defaults for PrimaryKeyType unless specified explicitly:
guid.comb for guids
assigned for strings
native otherwise
- Added basic support for CpBT (see IConversation interface and tests for usage)
- Added support for lazy="extra" by setting Lazy=true and ExtraLazy=true
(Patch by Eddie Cianci, AR-ISSUE-279)
- Bugs fixed:
AR-ISSUE-157
AR-ISSUE-180
AR-ISSUE-192
AR-ISSUE-271
AR-ISSUE-272
AR-ISSUE-274
AR-ISSUE-275
AR-ISSUE-276
AR-ISSUE-277
AR-ISSUE-278
AR-ISSUE-280
2.0 Beta1
===
- Updated NHibernate to 2.1.0 CR1. Please specify the byte code provider in your config files.
- (AR-ISSUE-258) Added Castle.ActiveRecord.Testing.InMemoryTest base class for in memory SQLite testing.
- (AR-ISSUE-257) Added NHibernate Search integration.
- (AR-ISSUE-256) Integrated ActiveRecordLinq from contrib without changes
- (AR-ISSUE-236) Added schema-action, so that behaviour for create/drop/update schema can be defined per class.
- (AR-ISSUE-254) Added StatelessSessionScope for higher performance. Functionality is restricted, see test cases for
StatelessSessionScope.
- (AR-ISSUE-253) Added support for lazily loading many-to-one-relations (BelongsTo) via proxies.
- Bugs fixed:
AR-ISSUE-249
AR-ISSUE-261
AR-ISSUE-264
AR-ISSUE-265
2.0 Alpha1
===
- Updated NHibernate to 2.1 Alpha. Please specify the byte code provider in your config files.
- Restored AutoFlush behaviour under NHibernate 2.0.
- Added code that can guess an collection of mapped Enums without specifying the ColumnKey, Element or ElementType.
Breaking: changed the ElementType from a string to a type.
- Search parent models when trying to infer BelongsTo relationship information.
- Allow CompositeUserType to be applied to fields too.
- Adding support for integrating NH models and AR models.
Sample of how this can be done can be found here:
https://svn.castleproject.org/svn/castle/trunk/ActiveRecord/Castle.ActiveRecord.Tests/IntegrationWithNHibernateTestCase.cs
- Supporting mutli table entities using JoinedTable
For more details: http://blogs.hibernatingrhinos.com/Craig/archive/2008/06/29/multi-table-entity-support-for-activerecord.aspx
- Added Default property to PropertyAttribute and FieldAttribute. When present it renders
<column default="value" />
Which one day will be supported by NHibernate, right?
- Added UpdateSchema to ARStarter
- Applied Alwin's patch adding IValidationProvider common interface for AR models that can be validated.
- Applied Rick Fleming's patch adding GetRegisteredTypes to ActiveRecordStarter.
- Added IsOverride to PrimaryKey attribute to allow a primary key in a derived
class to override one in the base class.
- Applied Vladimir Okhotnikov's patch fixing TransactionScope Flush
- Applied Alun Harford's patch fixing AR-182
"ActiveRecordStarter.ModelsCreated run too late"
- Added IsOverride to Property attribute to allow a property in a derived
class to override one in the base class.
- Added SqlQueryJoinDefinition, SqlQueryScalarDefinition and refactored to
put behavior in IQueryModifier.Apply.
- Added QueryResultTransformer modifier to allow setting a results transformer.
- Applied patch from Patrick Steele adding support for DiscriminatorLength in mappings.
- Added support for validating nested properties.
- Applied patch from Roger Chapman allowing ActiveRecord to be used signed in Medium trust.
- Applied patch from Steven Radack which catches invalid configuration of multiple database types. (They must be abstract).
Now AR throws an exception rather than silently using the same database.
Release Candidate 2
===================
- Mark SessionScope.Dispose(true) overload as deprecated. FlushMode.Never is the new black.
- Added support for property-ref to BelongsTo (many-to-one)
- Added support for CompositeUserType properties in nested classes
- Added ActiveRecordBase.Asc/Desc(params string[] propertyNames) methods to allow convenient specification of sort order.
- Applied Oleg Snurnikov's patch fixing AR-178
"SessionScopeWebModule fails with HybridWebThreadScopeInfo"
- Applied Artur Grzegorzewicz's patch fixing AR-177
"Parameterless overload of ActiveRecordStarter.Initialize"
- Added RegisterAssemblies to ActiveRecordStarter
- Relaxed the need for Types that represent database boundaries to extend
from ActiveRecordBase. Following AR-160 changes.
- Applied Michael Thomas' patch fixing AR-165
"UniqueKey property on BelongsToAttributed does not cause generation of unique-key
attribute in associated many-to-one xml element"
- Applied Lee Henson's patch fixing AR-167
"A CompositeKey class with multiple Equals() overloads throws exception"
- Applied Michael Thomas' suggestion to fix AR-170
"Indeterministic crashes when creating the NHibernate Mapping"
- Applied Lee Henson's patch fixing AR-172
"Support for collection-type attribute on HasMany"
- Applied Gautier's patch fixing AR-173
"Add a type parameter to the methods : CreateSchema, DropSchema,
GenerateCreationScript and GenerateDropScript"
- Fixed AR-174
"GenerateCreationScripts and GenerateDropScripts generate the scripts for only one database"
- Applied Mike Thomas' suggestion to make AR work with multiple databases without the
ARBase usage. This fixes AR-160
- Added support for SaveOrUpdateCopy() which facilities working with detached objects.
- Applied Tim Haines' patch adding the ability to verify if the models match the db
structure. This can be done by setting the "verifyModelsAgainstDBSchema" attribute to true on
the ActiveRecord configuration node, or using the method VerifySchema on ActiveRecordStarter
- Applied Lee Henson's patch change Exists implementation to use ISession.Get
This is required for lazy loaded classes as the old implementation would always
return true for them.
- Applied patch by David N. Godfrey that
- Refactored ActiveRecord to rely on Castle.Components.Validator to perform validations
- Fixed an old behavior where ActiveRecord didn't notify the session scope about sessions
that were invalidated due to database errors.
- Pushed processing of configuration into InPlaceConfigurationSource so both
ActiveRecord and ActiveRecordFacility could handle it in one place.
- Fixed AR-151
"XmlGenerationVisitor.MakeCustomTypeAtt doesn't support generic types"
- Applied Matthew Robinson's patch fixing AR-152
"Incorporation of subselect fetch strategy"
- Added the CompositeUserTypeAttribute and allowed the use of NHibernate's ICompositeUserType (AR-128)
- Applied the Marc-Andr�'s tests patch (AR-136).
- Applied Simon Laroche's patch fixing AR-141
"Support for NHibernate nested-composite-element"
- Fixed the Validation for Generic types (AR-122 and MR-237)
- Fixed working with Lazy objects.
Classes that are marked with [ActiveRecord(Lazy = true)] break in the EnsureInitialized function with the exception:
Castle.ActiveRecord.Framework.ActiveRecordException:
You have accessed an ActiveRecord class that wasn't properly initialized. The only explanation is that the call to ActiveRecordStarter.Initialize()
didn't include CProxyTypeCastle_ActiveRecord_Tests_ModelVeryLazyObjectModel_NHibernate_ProxyINHibernateProxy1 class
- Applied Andrew Denysenko's patch fixing AR-142
"Allow setting "batch-size" on collections"
- Applied Roy Tate's patch fixing AR-143
"XmlGenerationVisitor generates incomplete XML mapping
for BelongsTo with composite key"
- AR-140 - Patch to allow "The <component> element allows a <parent> subelement that maps a property of the component class as a reference back to the containing entity."
- Applying commutative patch from Roy Tate: AR-133, AR-139, AR-138
ActiveRecordMultiQuery, ActiveRecordCriteriaQuery, CriteriaHelper, CountQuery.
- AR-129: Applied patch by John Hurrell
"Implement NHibernate's "foreign-key" Attribute"
- AR-130: Fixed
"BelongsTo attribute does not support UniqueKey"
- AR-135: Applied patch from Rafael Steil - better error message when using non interface type for an association.
- AR-134: Applied patch from Kristofer Goss. Can now use [Field] on [Nested] types.
- AR-131 Applied patch Dave Godfrey. Using [Fetch] to specify the fetch strategy NHibernate will use. Note that this [Obsolete] the OuterJoin property on BelongsTo, in favor of the Fetch property.
- Added RawXmlMappingAttribute base class, which can be used to give Active Record additional mapping from external source.
This functionality was added to support rare cases that Active Record do not support (mapping an entity from a 3rd party assembly, etc).
Prefer to use the standard Active Record features over this.
- Applied John Hurrell's patch fixing AR-94
"ScalarQuery<T> on an empty table creates a null reference exception"
- Applied Ernst Perpignand's fixing AR-126
"Collection of dependent objects"
Quoting 'patch implementing collection of dependent objects as per Hibernate documentation section 7.2'
- Fixed AR-125
"Cannot use webservices or XmlSerializer on classes derived from ActiveRecordValidationBase because of IDictionary PropertiesValidationErrorMessage"
- Applied Patrick Earl's patch, adding event ModelCreated that allows to re-configure the model before
generating the XML for NHibernate.
- Added HqlNamedQuery attribute and allowed to use the Import attribute at the assembly level
- Applied Brian Romanko's patch fixing AR-104
"IsUniqueValidator does not work properly with nullable primary keys"
- Add Count(ICriterion[] criteria) overrides to ActiveRecordMediator and ActiveRecordMediator.Generic (original patch from Andy W. Dobbels)
- Fixed AR-120
"Add support for the <Operation>AndFlush family of methods to ActiveRecordMediator"
- Applied Jan Persson's patch fixing AR-122
"Problems validating inherited properties when using generics"
- Applied Edward Kreis' patch fixing AR-124
"ActiveRecord OneToOne attribute's "constrained" parameter doesn't appears in a NHibernate mappings"
- Applied John Hurrell's patch fixing AR-123
"Additional OnFlush functionality"
- Exposed some IValidator's properties.
- Renamed IActiveRecordQuery.Target to IActiveRecordQuery.RootType
- Added SetRange to ProjectionQuery<,>
- Made HasMany a bit smarter when dealing with Map elements.
AR now can guess the IndexType, the MapType and the Table name from the IDictionary<,> property.
(DotNet 2 only.)
- AR-118 added NoSetter.LoweCase property access option.
- Fixed AR-117 "ActiveRecordBase CRUD Methods Ignore SessionScope FlushMode"
The operations Save, Create, Delete, Update will not flush the session anymore
The operations SaveAndFlush, CreateAndFlush, DeleteAndFlush, UpdateAndFlush will
- Removed HqlBasedQuery.Count operation as it didn't work for complex queries
- Fixed AR-110 "Support rollback on TransactionScope Dispose without commit."
Now you can create a TransactionScope defining the behavior
if the dispose is reached and neither a votecommit nor voterollback was called
- Applied Andrew Peters' (see AR-105) with the following changes
- [breaking change] Renames ActiveRecordBase.CountAll to ActiveRecordBase.Count
as several overloads are by criteria and IMHO Count is a better, more general name.
- Adds an overload of Count that accepts an ICriterion[] - Modified CountQuery
to use NHibernate 1.2 Projections
- Reimplements (http://support.castleproject.org//browse/AR-100) so that it uses
the new Count overload instead of FindAll.
- Filled in as many missing doc comments as I could before my eyes hurt :-)
- Renamed "criterias" to "criteria" in method signatures - "criterias" is not a word.
- Reformatted code.
- Fixed AR-115 Exists always returns True for lazily-proxied classes
Changed FindByPK to use Get/Load according to its parameters.
- Included PrimaryKeyType.Custom and property CustomGenerator:Type
allowing one to supply its own generator
- Included PrimaryKeyType.Counter and PrimaryKeyType.Increment
- Applied patch from Drew Burlingame
Add ActiveRecordBase<T>.Exists(params ICriterion[] criterias)
Method also added to ActiveRecordBase.
- Applied patch by Andrew Peters fixing AR-97
"Pluralization of table names"
This patch introduces the pluralizeTableNames attribute on the configuration
which, if set to true, pluralizes the ActiveRecord types tables where no name
was specified.
For example:
[ActiveRecord]
public class Student : ActiveRecordBase<Student>
The table name will be infered as 'Students'
- Applied patch by Ernst Naezer fixing AR-93
"Scaffolding / ARdatabind crash when Typeof is not supplied in the HasMany attribute."
- Applied Lee Henson's patch fixing AR-88
"Move GetFieldOrPropertyValue from ConfirmationValidator to AbstractValidator"
- Applied Lee Henson's patch fixing AR-86
"Expose DetachedCriteria on ActiveRecordBase<T>.SlicedFindAll"
- Fixed AR-84: ActiveRecord TransactionScope should export interface to set IsolationLevel
Now you can specify the isolation level when you create a TransactionScope
- Applied Carlos Ble's patch adding Replicate support to ActiveRecordBase
- Moved ProjectionQuery and ScalarProjectionQuery to Castle.ActiveRecord.Queries, with the rest of the queries.
- Added untyped projection support, using just ProjectionQuery<Post>, which uses object[] tuples.
- Added real projection support, which allows the following code:
ProjectionQuery<Post, PostTitleAndId> proj = new ProjectionQuery<Post, PostTitleAndId>(
Projections.Property("Title"), Projections.Property("Id"));
ICollection<PostTitleAndId> posts = proj.Execute();
foreach(PostTitleAndId titleAndId in posts)
{
PostsList.Add( new ListItem(titleAndId.Title, titleAndId.Id) );
}
- Renamed ProjectionQuery<T> ScalarProjectionQuery<T>, in preperation for real projections.
- Added DetachCrietia support in ARBase<T>, which allows integration with NQG, and in general enables taking advantage of the full criteria API.
Improved methods are FindOne, FindAll, FindFirst
- Move to used NHibernate 1.2 rev #2352
- Applied Josh Robb's patch adding a check for isWeb=true on the Session module.
- Returned to the default lazy false behavior.
- Will automatically initialize entities when loading outside of scope.
- Removed IModelNode since it was no longer of any value.
- Added XML Documentation to all public/ protected methods
- Moved to using NHibernate 1.2 beta 1
IEntityPersister instead of IClassPersister
I had some issues with Nullables.dll support, but mainly because the hard coded version number.
Different DB Tests failed because of the way NHibernate changed transaction handling (more thorough cleansing of them), I manually saved the transaction executed, and they tests pass now.
I added type guessing to ISet<> (set), IList<> (bag), ICollection<> (bag), IDictionary<>(map)
The nicest new feature IMO is this:
ProjectionQuery<Blog, int> proj = new ProjectionQuery<Blog, int>(Projections.RowCount());
int rowCount = proj.Execute();
Assert.AreEqual(1, rowCount);
Release Candidate 1
===================
- Changed name of mapping files generated when isDebug=true. They now follow the NHibernate convention of name.hbm.xml
- Refactored: CompositeKey is not a class level attribute anymore
(minor breaking change)
Instead of
[PrimaryKey]
public SomeClass Id { get/set }
You must use
[CompositeKey]
public SomeClass Id { get/set }
- Added support for queries using the SQL language instead of HQL,
on classes derived from HqlBasedQuery (SimpleQuery, ScalarQuery, etc).
- Added ActiveRecordModel.GetModels(), which returns an array containing every registered ActiveRecordModel.
- Fixed AR-53
"Unique key on multiple columns"
Introduced UniqueKey on PropertyAttribute and FieldAttribute
- Introduced the following properties on PropertyAttribute and FieldAttribute:
- Index
- SqlType
- Check
- Fixed AR-78
"Allow users to specify autoImport"
Use the property UseAutoImport on ActiveRecordAttribute to control auto-import
- Resynched ActiveRecordAttribute with NHibernate <class> mapping. Added:
- SelectBeforeUpdate
- Polymorphism
- Mutable
- BatchSize
- Locking
- Fixed AR-31
"Create property CustomPersister or Persister (Type) on ActiveRecordAttribute"
Added Persister property to ActiveRecordAttribute
- Applied Marc-Andr�'s patch fixing AR-79
"ValidateIsUnique not working with TransactionScope"
- Added XmlIgnore to IDictionary field on ARValidationBase
- Added support for generic abstract base class for a type hierarchy per discussions with Don
Morrison on IRC. The Generic Abstract Base class must conform to all the previous rules to
implement an abstract base class in a type hierarchy.
When initializing the class using the ActiveRecordStarter, you must use syntax similar to the
following:
ActiveRecordStarter.Initialize( GetConfigSource(),
typeof(Model.GenericModel.Entity<>),
typeof(CompanyEntity),
typeof(PersonEntity));
Please see the GenericJoinedSubClassTestCase.cs for an example.
All rules about covariance and contravariance still apply.
- Applied Michael Morton's patch adding support to NHibernate's INamingStrategy.
This allow one to associate an implementation of INamingStrategy
through an attribute 'namingstrategytype' on activerecord config node
- Applied suggestion from Gokhan Altinoren fixing AR-77
"VisitPrimaryKey fails to generate correct <generator> xml
element for PrimaryKeyType.Identity when the system culture is set to Turkish"
- Applied Michael Morton's patch fixing AR-76
"SemanticVerifierVisitor Issue With NHibernate User Types"
- Refactored CompositeKey support. Now instead of using
[PrimaryKey]
public SomeClass Id { get/set }
[CompositeKey]
public class SomeClass { ...
You should use
[CompositeKey]
public SomeClass Id { get/set }
The old way is still supported though.
- Applied Freyr Magn�sson's patch fixing AR-75
"SemanticVerifierVisitor causing fauly xml when using composit key"
- Added support for "ColumnPrefix" on [Nested] attribute. This change allows
a better usage of components, such as:
public class Name {
private String first, last;
[Property("first_name")] public string First { ... }
[Property("last_name")] public string Last { ... }
}
[ActiveRecord("children")]
public class Child {
private Name name, fatherName, motherName;
/* maps to database columns: first_name and last_name */
[Nested] Name Name { ... }
/* maps to database columns: father_first_name and father_last_name */
[Nested(ColumnPrefix="father_")] Name FatherName { ... }
/* maps to database columns: mother_first_name and mother_last_name */
[Nested(ColumnPrefix="mother_")] Name MotherName { ... }
}
- Review OneToOneAttribute test case, added one more unit test
- Removed OuterJoin attribute from OneToOneAttribute, replaced by Fetch property
- Added PropertyRef to OneToOneAttribute
- Applied patch to patch from josh robb - FindAllByProperty now handles null values internallly.
- Applied patch from josh robb - FindAllByProperty now handles null values internallly.
- Applied Freyr Magn�sson's patch fixing misbehave related to abstract classes that defines different
database boundaries: "ActiveRecordStarter Initialize method assembply overloads fail
to add derived base types from config"
- Applied josh robb's patch "small fixup for length
validator error messages where there is only a minimum or maximum specified"
- Fixed AR-73: "Dynamic type adding after initialization"
- Added some logging. That's just a start: the idea is to increase AR verbosity
in order to reduce the need of debugging to diagnose problems.
- Refactored ActiveRecordStarter.Initialize to use ActiveRecordSectionHandler.Instance
- Introduced ActiveRecordSectionHandler.Instance to avoid repetitive code.
Now, instead of
IConfiguration source = (IConfiguration) ConfigurationSettings.GetSection("activerecord");
(or similar) you can use
IConfiguration source = ActiveRecordSectionHandler.Instance;
Bare in mind that it looks for a section named "activerecord" on the configuration
file associated with the AppDomain, and throws an exception if it cannot be found.
- Applied Marc-Andre's patch fixing AR-68
"Make ActiveRecordValidation.ValidationErrorMessages virtual to simplify localisation"
- Added SessionScope.Current static property to gain access to the
current ISessionScope implementation
- Changed ISessionScope:
Added FlushAction property
Added Flush method to allow people to have more control on when to flush
- Applied patch by Michael Morton <[email protected]>. Quoting explanation:
Since the generic base class varies with the type parameter
(i.e. ActiveRecordBase<One> is not the same as ActiveRecordBase<Two>)
there is no easy way to specify multiple configurations using the
"type=" attribute. There is also no easy way to create multiple
subclasses as the documentation suggests for when using the non
generic base class.
However, there is an easy fix for this. Even though, for example,
these two base types are "different", ActiveRecordBase<One> and
ActiveRecordBase<Two>, they share the same generic type definition,
namely "ActiveRecordBase`1". With a small change to the function
"GetRootType" in "SessionFactoryHolder.cs" to make it look at the
generic type definition when dealing with a generic type, instead
of the generic type itself, you can once again easily access multiple databases.
Usage:
You can now create multiple base types for each of your databases, such as...
class MyBaseOne<T> : ActiveRecordBase<T> { }
class MyBaseTwo<T> : ActiveRecordBase<T> { }
... and then specify config for each by using the "type=" attribute like so ...
<config type="MyBaseOne`1, MyAssembly">
</config>
<config type="MyBaseTwo`1, MyAssembly">
</config>
Any subclasses of those will then get the correct configuration
settings. I have been using this change in my own builds for a
couple weeks now and it seems to be working ok. I have not
written any tests specifically for it, yet, but wanted to get
it out there in case anyone was interested.
- Applied patch by Brian Romanko <[email protected]> allowing the use
of different type for a Nested type (what NHibernate refers as a Component)
- Fixed AR-65: ActiveRecordBase<T> prevent users from using type inheritance
Refactored ActiveRecordBase<T> to extend ActiveRecordBase
Refactored ActiveRecordMediator<T> to extend ActiveRecordMediator
Could not do the same thing for the validation<T>
- Removed dependency on the Nullables library.
- Added native support for .NET 2.0 Nullables.
- Applied Brian Romanko <[email protected]> patch fixing enum support
- Fixed AR-62: DifferentDatabaseScope not switching between databases
- Introduced HybridWebThreadScopeInfo which, as the name implies,
uses both strategies to handle scope storage. Useful only for some complex scenarios
- Added support for RelationType.List.
- Simplified Exists<PkType> method on ActiveRecordBase<T>.
- Fixed AR-46 - OneToOne Attribute Does Not Support Specifying a Target Type
Added property MapType to OneToOne attribute
- Added ActiveRecordStarter.ResetInitializationFlag. Useful for test cases
that invoke Initialize multiple times
- Fixed AR-52 - Dont allow one to invoke Initialize more than once
- Added some flexibility into ActiveRecord Queries. They are now mutable,
which means we now have methods like 'SetParameter', 'SetParameterList' and
'SetRange'; and the 'Query' property is now read-write.
- Added support for query modifiers in ActiveRecord Queries. Any object implementing
IQueryModifier can be added to an ActiveRecordBaseQuery, using the
(protected) 'AddModifier' method. Parameters and query ranges
are implemented as query modifiers.
- Fixed AR-39: Added virtual to IsValid on ActiveRecordValidationBase/<T>
- Fixed AR-45: Added BindingFlags.NonPublic to DefaultBindingFlags on ActiveRecordModelBuilder
- Added Element to RelationAttribute, now can map relations of simple types
Usage:
[HasMany(typeof(string), "ItemId", "Elements", Element = "Name")]
- Applied Antonio's patches
See http://forum.castleproject.org/posts/list/457.page and
http://forum.castleproject.org/posts/list/566.page
- Added Debug to IConfiguration Source. If set then XmlGenerationVisitor will save nhibernate mapping files to the AppDomain.BaseDirectory.
Usage: if you're the XmlConfigurationSource or the Section add the isDebug="true" attribute
- Added support to CompositeKeys as Foreign Keys (kudos to G. Richard Bellamy)
BelongsToAttribute - Added CompositeKeyColumns property.
HasAndBelongsToManyAttribute - Added CompositeKeyColumnKeys and CompositeKeyColumnRefs.
HasManyAttribute - Added CompositeKeyColumnKeys.
VersionAttribute - Added support for UnsavedValue.
SemanticVerifierVisitor - Added checks to ensure the composite key attributes are used properly.
XmlGenerationVisitor - Added output to support mapping the composite key attributes, as well as the unsaved-value attribute for Version.
In general, the changes are motivated by the need to have AR map to
legacy data, where composite keys are used as both primary and foreign
keys. The current AR support for CompositeKeys does not support
associations, this patch does.
There are some caveats when using this, which are driven by the NH
implementation. An assigned identifier (like all CompositeKeys and
many string PrimaryKeys) cannot be used to determine whether an instance
is detached or transient - since it's assigned by the application, it's
never null. Therefore, you must use another strategy, NH will misbehave
around the way it persists the instance to the database. That is why the
VersionAttribute had to have the support for UnsavedValue - the UnsavedValue
property of the Version is used by NH to determine the state of the instance.
For a discussion of the appropriate mappings and usage, see "Hibernate in Action," pgs. 330 - 335.
- Added SessionScopeWebModule which hooks BeginRequest and EndRequest initializing and
destructing a SessionScope properly. In order to use it add to httpModules section
(web.config):
<system.web>
<httpModules>
<add name="ar.sessionscope" type="Castle.ActiveRecord.Framework.SessionScopeWebModule, Castle.ActiveRecord" />
</httpModules>
</system.web>
- Added lifecycle methods that can be overriden:
. OnSave
. OnUpdate
. OnLoad(id)
. OnDelete
- Applied patch from Ahmed Ghandour <[email protected]> adding the methods
FetchCount and Exists to ActiveRecordBase
- Applied patch from Dave Godfrey fixing nested classes with relations problems (http://forum.castleproject.org/posts/list/457.page)
- Fixed a stack overflow exception when using IsUnique inside a session scope.
- You can now apply IsUnique to a property that also has PrimaryKey on it without problem.
- Resolved IsUnique bug with ActiveRecordValidationBase<> (it was non functional)
- Resolved test bugs with IsUnique for .net 1 and .net 2.
- Refactored query support:
- Introduced generic interface IActiveRecordQuery<T>, extending IActiveRecordQuery, for strongly-typed Execute() method support;
- Added IActiveRecordQuery.Enumerate(), for memory-intensive queries;
- Introduced HqlBasedQuery, decoupling ActiveRecordBaseQuery from HQL usage;
- Added ValidateCreditCard validation attribute.
- Added ValidateLength validation attribute.
- Added support for .Net 2.0 Connection Strings in the config file, using this method:
<activerecord>
<add key="hibernate.connection.connection_string" value="ConnectionString = ${ConnectionStringKey}" />
</activerecord>
<connectionStrings>
<add name="ConnectionStringKey" connectionString="The Connection String"/>
</connectionStrings>
This allows to take advantage of the connection string encryption as well as manage them using the built in tools.
- Added Exists<PkType>(PkType id) support to allow for checking of an object's existance
in the datastore.
- Brought ActiveRecordBase.Generic inline with ActiveRecordBase feature wise.
Public Static Methods are now present on all ActiveRecordBase.Generic objects for common tasks such as Find, FindAll, etc.
<This is a breaking change.>
- Added support for NHibernate dynamic-update, dynamic-insert to ActiveRecordAttribute
- Simplified NHibernate markup generation for testing
Attributes are now written in one of two ways. Tags that have both an open and close
will have no space at the end of the attributes on the opening tag, while tags that
have no contents (<tag />) will be written with one space after the last attribute.
Examples:
<openclose attrib="test" attrib2="test"></openclose>
<noclosetag attrib="test"/>
- Added ActiveRecordValidationBase<> to support validation on Generic AR classes
- Updated DeleteAll(Type targetType, IEnumerable pkValues) to support non int primary keys
- Add more hookable methods.
- Refactored Validation support to use NHibernate.IValidatable
- Brought ActiveRecordMediator.Generic inline with ActiveRecordMediator. This is a breaking
change (removal of a few methods/renaming of a few existing).
- Add import support (kudos to Dan Burnea)
[ActiveRecord, Import(typeof(ImportClassRow), "ImportClassRow")]
public class ImportClass : ActiveRecordBase
beta 3
======
- Added FindAllByProperty, FindFirst and FindOne
- Added DeleteAll(type, where) (kudos to G. Richard Bellamy)
- Applied patch from Josh Robb. Added support for hooks on ActiveRecordBase<T>.
- DifferentDatabaseScope: so you can open a session using a different dbconnection
and persist your object model. Very experimental version
- Fixed: Support for multiple databases was completely broken.
- An implementation of ISessionFactoryHolder can be specified through the configuration, attribute sessionfactoryholdertype
on the config node.
- Added: ActiveRecordBase<T> - a generic form a ActiveRecordBase which relieves the need to re-write
all the base static methods to hide the type parameter and cast the result. Generics do it for you.
- Added: ActiveRecordStarter.CreateSchemaFromFile(filename) as an alternative to CreateSchema.
- Added: Support for composite keys - composite key class must be serializable and implement both Equals and GetHashCode.
Not complete support, missing the NHibernate key-many-to-one element in the composite key.
- Added: Support for Lazy loading class using BelongsTo. Will throw if there is a non virtual property that
also BelongsTo().
- Closed: (AR-24) ValidationException must contain the validation error messages
- Support for fields in addition to properties
- Added [Any], [Any.MetaValue] and [HasManyToAny] attributes.
- Small improvement on ActiveRecordModelBuilder (less intensive on IsDefined/GetCustomAttribute)
- IThreadScopeInfo introduced. Two implementations: ThreadScopeInfo and WebThreadScopeInfo.
ThreadScopeInfo is the default implementation. You can use WebThreadScopeInfo by simply using
isWeb="true" on the configuration node:
<config isWeb="true">
..
Or you can provide your own implementation specifying the full type name
<config threadinfotype="my.threadinfotype, my.assembly">
..
beta 2
======
- Transaction support: lots of minor fixes
- Added support for map relations.
Necessary to specify Index and IndexType on the HasMany (or HasAndBelongsToMany)
- IsUnique validator fix
Version 0.0.1.5
===============
Inner workings fully rewritten, better test cases coverage
Added SlicedFindAll
Version 0.0.1.4
===============
Implemented support for Joined Subclasses
Implemented initial support for validations
Version 0.0.1.3
===============
Applied patch from John Morales (support for idbags)
Version 0.0.1.2
===============
Applied patch from John Morales (support for sets)
Applied suggestion and fixes from "jianxiao jiang" <[email protected]> (NHibernateDelegate)
Version 0.0.1.1
===============
Applied patch from Luiz C�sar Kuriki <[email protected]> in order to support NHibernate's Component feature
Applied modification suggested by Andrew Hallock and Craig Neuwirt in order to support HasOne relations.
Version 0.0.1.0
===============
Released (not changes to track yet)