Terry's blog

Focus on bigdata and cloud.

博客园 首页 新随笔 联系 订阅 管理
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 39 下一页

2009年2月17日 #

摘要: 概述: 当运行 session.Save(tnp);时,出现这个"Unknown entity class: TestCleanSnow.TestNhibernatePerson"这个异常. 映射文件 TestNhibernatePerson.hbm.xml如下: Code highlighting produced by Actipro CodeHighlighter ... 阅读全文
posted @ 2009-02-17 16:06 王晓成 阅读(3495) 评论(1) 推荐(0) 编辑

2009年2月16日 #

摘要: 转自官方文档:http://logging.apache.org/log4net/release/config-examples.html log4net Config Examples Overview This document presents example configurations for the built-in appenders. These configuratio... 阅读全文
posted @ 2009-02-16 17:43 王晓成 阅读(653) 评论(0) 推荐(0) 编辑

摘要: 我用的是Oracle9i,应用程序app.config的配置如下" Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> NHibernate.Dialect.MsSql2000D... 阅读全文
posted @ 2009-02-16 15:46 王晓成 阅读(2345) 评论(0) 推荐(1) 编辑

2009年2月13日 #

摘要: 主键产生器 可选项说明: 1) assigned 主键由外部程序负责生成,无需NHibernate参与。 2) hilo 通过hi/lo 算法实现的主键生成机制,需要额外的数据库表保存主 键生成历史状态。 3) seqhilo 与hilo 类似,通过hi/lo 算法实现的主键生成机制,只是主键历史 状态保存在Sequence中,适用于支持Sequence的数据库,如Oracle。 4) incr... 阅读全文
posted @ 2009-02-13 16:03 王晓成 阅读(1379) 评论(1) 推荐(1) 编辑

摘要: 1建立数据表 Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->create table Test_Increase( userid number(10) primary key, /*主键,自动增加*/ ... 阅读全文
posted @ 2009-02-13 15:51 王晓成 阅读(11645) 评论(0) 推荐(1) 编辑

摘要: 代码如下: Configuration config = new Configuration(); config.AddAssembly("TestCleanSnow"); ISessionFactory factory = config.BuildSessio... 阅读全文
posted @ 2009-02-13 11:07 王晓成 阅读(348) 评论(1) 推荐(0) 编辑

2009年2月12日 #

摘要: 在执行 session.Save(cs); 时,出现could not get next sequence value[SQL: SQL not available] Nhibernate 解决办法: 把相应XML的 改为 以上我做Oracle时出现的错误,操作sqlserver的时候应该为 . 阅读全文
posted @ 2009-02-12 15:07 王晓成 阅读(1498) 评论(0) 推荐(0) 编辑

摘要: 在加载映射文件及相应的类文件的引用时 Configuration config = new Configuration(); config.AddAssembly("TestCleanSnow"); 出现如下异常: Could not compile the mapping document: TestCleanSnow.BjkptOaxtCleanupsnow... 阅读全文
posted @ 2009-02-12 14:50 王晓成 阅读(4605) 评论(2) 推荐(0) 编辑

摘要: 在 ISessionFactory factory = config.BuildSessionFactory();时发生 NHibernate.InvalidProxyTypeException: The following types may not be used as proxies: TestCleanSnow.BjkptOaxtCleanupsnow: method set_IsDele... 阅读全文
posted @ 2009-02-12 14:43 王晓成 阅读(588) 评论(0) 推荐(0) 编辑

2009年2月10日 #

摘要: 概述: 复制表的结构(只复制表结构,源表名:b_Jkpt_Oaxt_Trafficaccident 新表名:Test_OAXT_TrafficAccident) Oralce语句: create table Test_OAXT_TrafficAccident as select * from b_Jkpt_Oaxt_Trafficaccident where 1=2 阅读全文
posted @ 2009-02-10 14:38 王晓成 阅读(532) 评论(0) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 39 下一页