Hi there,
The user Bill Ataras (bataras) has changed the issue FACILITIES-ISSUE-122
"Allow configuration of NamingStrategy".
Here is what the user changed:
Description
from: As of revision 5846, there is no way to specify the AR
naming strategy via the AR integration facility. This means with new projects,
it's super hard to create a DB schema that uses for example lower case
underscore naming.
The patch below should fix that. I'd attache the patch file but I don't see a
way to do that here.
Index:
Facilities/ActiveRecordIntegration/Castle.Facilities.ActiveRecordIntegration/ActiveRecordFacility.cs
===================================================================
---
Facilities/ActiveRecordIntegration/Castle.Facilities.ActiveRecordIntegration/ActiveRecordFacility.cs
(revision 5846)
+++
Facilities/ActiveRecordIntegration/Castle.Facilities.ActiveRecordIntegration/ActiveRecordFacility.cs
(working copy)
@@ -245,6 +245,7 @@
string pluralize =
facilityConfig.Attributes["pluralizeTableNames"];
string verifyModelsAgainstDBSchema =
facilityConfig.Attributes["verifyModelsAgainstDBSchema"];
string defaultFlushType =
facilityConfig.Attributes["flush"];
+ string namingstrategytype =
facilityConfig.Attributes["namingstrategytype"];
SetUpThreadInfoType(ConvertBool(isWeb), threadinfotype);
SetDebugFlag(ConvertBool(isDebug));
@@ -256,6 +257,8 @@
SetDefaultFlushType(DefaultFlushType.Classic);
else
SetDefaultFlushType(defaultFlushType);
+ if (!string.IsNullOrEmpty(namingstrategytype))
+ SetUpNamingStrategyType(namingstrategytype);
foreach(IConfiguration config in
facilityConfig.Children)
{
to: As of revision 5846, there is no way to specify the AR
naming strategy via the AR integration facility. This means with new projects,
it's super hard to create a DB schema that uses for example lower case
underscore naming.
The attached patch should fix that.
For more, see
http://support.castleproject.org/projects/FACILITIES/issues/view/FACILITIES-ISSUE-122
--
donjon
by Castle Stronghold
http://www.castle-donjon.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Development List" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/castle-project-devel?hl=en
-~----------~----~----~----~------~----~------~--~---