Original article: http://www.darkside.co.za/archive/2009/05/25/configuring-castle-activerecord-2.aspx
Recently, I learned how to use activerecord according to the activerecord series tutorials provided by Dr. Li huijun. An error has been reported:
The proxyfactoryfactory was not configured.
Initialize
'Proxyfactory. factory_class 'property of the session-factory Configuration
Section with one of the available nhib.pdf. bytecode
Providers.
Example:
<Property
Name = 'proxyfactory. factory_class '> nhib.pdf. bytecode. linfu. proxyfactoryfactory,
Nhib.pdf. bytecode. linfu </property>
Example:
<Property
Name = 'proxyfactory. factory_class '> nhib.pdf. bytecode. Castle. proxyfactoryfactory,
Nhib.pdf. bytecode. Castle </property>
Here is my translation:
If you want to download the castle activerecord 2 alpha version to see which projects it has extended, you will probably get an error "The proxyfactoryfactory was not configured. initialize 'proxyfactory. factory_class 'Property of the session-factory configuration section with one of the available nhib.pdf. bytecode providers. "because the new version of this release uses nhib1_version2.1.0.1003, you have to add the information in the configuration to work normally, as shown below (13th rows are newly added)
1 <activerecord
2 isweb = "false"
3 isdebug = "true"
4 threadinfotype = ""
5 sessionfactoryholdertype = ""
6 namingstrategytype = "">
7 <config>
8 <add key = "connection. provider" value = "nhib.pdf. Connection. driverconnectionprovider"/>
9 <add key = "dialect" value = "Nhibernate. dialect. mssql2005dialect"/>
10 <add key = "connection. driver_class" value = "nhib.pdf. Driver. sqlclientdriver"/>
11 <add key = "connection. connection_string" value = "Server = (local); initial catalog = apptest; Integrated Security = sspi"/>
12 <add key = "show_ SQL" value = "true"/>
13 <add key = "proxyfactory. factory_class" value = "nhib.pdf. bytecode. Castle. proxyfactoryfactory, nhib.pdf. bytecode. Castle"/>
14 </config>
15 </activerecord>