如何单元测试流利的映射,当你有序列时在内存中使用sqlite [英] how to Unit test fluent mappings, with in memory sqlite when you got sequences

查看:109
本文介绍了如何单元测试流利的映射,当你有序列时在内存中使用sqlite的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的真正的数据库是甲骨文,并有序列(不在我的控制下)。
我想测试在内存中的映射sqlite数据库,
我想过几个选项,做一个序列约定(如果可能的话),只有当我在oracle上的活动,使Id映射调用另一个方法,将自己解决id映射,并问一些关于配置的分贝。



我的问题的最佳做法是什么?

解决方案使用 GenretedBy.Native([seqName]);


My Real db is oracle, and has sequences(not under my control). I wanna test the mappings with in memory sqlite db, I thought about a few options, do a sequence conventions(if possible) that will be active only when I'm on oracle, make the Id Mapping call another method that will resolve the id mapping by it self and ask some one about the configured db.

What is the best practice for my problem?

解决方案

Use the GenretedBy.Native([seqName]);

这篇关于如何单元测试流利的映射,当你有序列时在内存中使用sqlite的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆