blogjava's web log

blogjava's web log
...

  1. Membership/role/profile API: http://quickstarts.asp.net/QuickStartv20/aspnet/doc/security/membership.aspx
  2. SiteMap:
  3. Masterpages::
  4. ASP.NET Ajax:
  5. Localization:
  6. Themes:
posted @ 2007-06-15 22:26 record java and net 阅读(390) | 评论 (0)编辑 收藏

				
						
"Failed to lazily initialize a collection"
				try
{
session = Class1.GetFactory().OpenSession();
Archives archives= session.Get(typeof(Archives), id) as Archives;
NHibernate.NHibernateUtil.Initialize(archives.ArticlesList);return archives;
}
catch (Exception ex)
{
throw ex;
}
finally { session.Close(); }
 或者
session.CreateCriteria(typeof(Catalog))
.Add(Expression.Eq("ID"),id)
.SetFetchMode("Specifications",FetchMode.Join)
.UniqueResult() as Catalog;


或者

left JOIN FETCH

这样在session关闭 照样取他的 级联对象 ,
posted @ 2007-06-15 22:23 record java and net 阅读(1507) | 评论 (0)编辑 收藏

ActiveWriter is a visual designer, an addin for Visual Studio 2005, to design a domain model and to generate code decorated with ActiveRecord attributes.
If you are familiar with ActiveRecord, this tool will make your ActiveRecord experience a little easier. If you are not, be sure to check ActiveRecord's web site given above first, there are tons of information to begin with and a great forum if you need some help.
Please see using.castleproject.org for the documentation.

 

SVN repository at  https://svn.castleproject.org/svn/castlecontrib/activewriter/

Preview 3 Release - 14/06/2007

What's new:

  • Now optionally generates NHibernate hbm.xml files.
  • Namespace in generated code is now customizable (Idea: Robert van Hoornaar)
  • Imports in generated code is now customizable (Idea: Robert van Hoornaar)
  • Model classes can override model level base class definition. (Patch: Robert van Hoornaar)
  • Model classes can override model level generics generation. (Idea: Robert van Hoornaar)
  • Contrib-26: Add support for AR Nested / NH Component mappings. Allow the ability to specify a column prefix for active record. (thx: Adam Tybor)
  • Optionally generates classes implementing INotifyPropertyChanged.
  • Support for drag-drop from Server Explorer for MySQL databases. Requires MySQL Connector/Net (5.1). (Patch: Michael Morton)
  • Support for custom types through IUserType. See http://support.castleproject.org/browse/CONTRIB-28#action_11456 for usage. (Patch: Ricardo Stuven)
  • Ability to define a nested class with a different property name than the nested class (Idea: Craig Neuwirt)

 

详情:
http://altinoren.com/PermaLink,guid,7043a882-8325-4e48-b956-54868219297c.aspx

posted @ 2007-06-15 22:21 record java and net 阅读(606) | 评论 (0)编辑 收藏

http://www.lingoes.cn/

灵格斯词霸 -- 免费的词典与文本翻译软件

http://maxpda.com/

posted @ 2007-05-27 10:49 record java and net 阅读(341) | 评论 (0)编辑 收藏

Custom Membership and Role Providers using NHibernate

该工程已经迁入CodePlex

地址 http://www.codeplex.com/nhibernateprovider

 

NHibernate Plugin for Visual Studio 2005

这个Nhibernate插件也可以用用。图形化设计生成hbm.xml文件和实体类

感觉还不错。如何使用可以看看Getting Started with NHibernate Plug-in for Visual Studio 2005

截2张图

 设计界面

属性值可以设置

 

最终 生成的配置文件Archives.hbm.xml

<hibernate-mapping default-cascade="none" xmlns="urn:nhibernate-mapping-2.2">
  <class name="WindowsApplication1.Archives, WindowsApplication1" table="Archives">
    <id name="id" type="System.Int32" column="id" unsaved-value="0">
      <generator class="native" />
    </id>
    <property name="Name" type="System.String" column="name" not-null="false" length="50" />
    <property name="CreateDate" type="System.DateTime" column="createDate" not-null="false" />
  </class>
</hibernate-mapping>
posted @ 2007-05-12 22:53 record java and net 阅读(2460) | 评论 (3)编辑 收藏
仅列出标题
共31页: 上一页 1 2 3 4 5 6 7 8 9 下一页 Last 

导航

常用链接

留言簿(44)

新闻档案

2.动态语言

3.工具箱

9.文档教程

友情链接

搜索

最新评论