随笔分类 - Nhibernate
摘要:本篇描述如何使用GridView(需要实现IPageableItemContainer接口)加DataPager实现分页功能。并使用ObjectDataSource控件来获得数据源实现分页。 1,O...
阅读全文
摘要:Nhibernate 2.1.0 support for bulk actions using HQL. Some HQL examples:
阅读全文
摘要:开场白表结构的准备Table: CustomerCustomerId: int, auto-increment PKFirstname: varchar50, nullableLastname: varchar50, nullableCREATE TABLE [dbo].[Customer]( [CustomerId] [int] IDENTITY(1,1) NOT NULL, [Firstname] [varchar](50) NULL, [Lastname] [varchar](50) NULL, CONSTRAINT [PK_Customer] PRIMARY KEY CLUSTERED
阅读全文
摘要:摘要:使用HQL返回自定义类型的结果集。 前提:已经定义好Customer类及其Nhibernate映射文件xml。 表结构及数据 自定义类 Mapping文件 条件查询(Criteria Query) 输出SQL 说明CustomerFirstnameCounter中的Count属性必须定义为long类型,如果定义为int类型,则会报如下错误:
阅读全文
摘要:In Solution Explorer, under Solution Items, double-click the test settings file, Local.testsettings. The Test Settings dialog box is displayed. Select <Local machine ...
阅读全文
摘要:方式一:方式二:Product类所在的程序集
阅读全文
摘要:http://oss.org.cn/ossdocs/framework/hibernate/reference-v3_zh-cn/http://nhforge.org/doc/nh/en/index.html
阅读全文
摘要:发现文件名少了hbm.错误类型:1,检查hbm.xml文件2,检查hibernate.cfg.xml是否配置mapping 如:<mapping assembly=”Ordering.Data”/>3, 检查Role.hbm.xml文件属性“生成操作”的值,从“内容”修改为“嵌入的资源”
阅读全文
摘要:method 1: method 2: behind-code
阅读全文