用项目见证Hibernate在数据库可移植性方面的优越性

国产数据库《人大金仓v8》适配过程问题解决记录 前言 注意:人大金仓数据库是一款基于PostgrelSQL开发的国产数据库,它的命令行、配置文件以及各种使用上都有PGSQL的影子,然后在PGSQL的基础上增加了图形化管理(参考:人大金仓Kingbase V8安装教程); 因此开发适配的时候,有些找不到资料的语法可以参考PostgrelSQL; 一、适配准备工作,准备人大金仓的jdbc驱动以及hibernate方言包 问题说明:人大金仓有不同jdk版本的驱动包,以及各个hibernate版本的适配方言,在安装目录的里面的jdbc文件里面; .. 阅读详情

今天上午来这里做数据库移植,用户开发的系统使用Hibernate作为持久层的框架,最早的版本是SQL Server的,后来移植到了Oracle上面,这次再次移植到国产数据库 GBase 8g上面。 由于使用Hibernate的hql语法,绝大部分的语句都不需要修改,只有很少的几个地方使用了sql query, 并且使用了特殊的oracle的函数, 简单的全文查找,然后调整一下就可以了。


在我见过的几个Java开发的项目里,存储过程是用量很少的,而我见过的.NET开发的项目里,基本都存在着大量的存储过程。理由大家各执一词,我就不再多说了。但这个项目可以证明一点,Hibernate 作为持久层,极少或者不用存储过程和自定义函数,不使用触发器,可以让项目具有最好的可移植性。

hibernate中所有数据库方言 hibernate支持的所有数据库方言。用起来很方便。 立即下载

相关推荐

国产神通数据库用到的jdbc驱动包、集成Hibernate用到的jar包

集成Hibernate的方言,版本有oscarHibernate36.jar,oscarHibernate4.jar,oscarHibernate5.jar

国产数据库适配-南大通用(Gbase)问题整理

执行下面这条命令会把ta的库导出到当前目录下的ta.exp文件夹中,其中表结构和表数据是分开存储的。Springboot工程 适配南大通用(gbase 8s)例如:data_flag 的字段类型为布尔,这查询语法如下。把表的主键自增类型设置为SERIAL。

EverythingAtOnce的博客 2607

Hibernate 配置各种数据库

Hibernate配置文件中配置各种数据库的driver、URL

hibernate使用序列作为主键在国产达梦数据库DM中的配置方法

hibernate有多种生成主键策略,例如assigned、increment、hilo、seqhilo、sequence、identity、native、uuid、guid等方法,其中native由hibernate根据使用的数据库自行判断采用identity、hilo、sequence其中一种作为主键生成方式,灵活性很强。如果能支持identity则使用identity,如果支持sequenc...

一十二独立 2066

GBase_Hibernate3.2.3_GA-Dialect_8.3.81.51_build50.1.jar

南大通用GBase数据库GBase_Hibernate3.2.3_GA-Dialect_8.3.81.51_build50.1.jar

Windows 下 Codex MCP 服务配置全攻略:从环境搭建到实战避坑

本文详细介绍了在Windows系统下配置Codex MCP服务的完整流程与实战避坑指南。内容涵盖从Node.js环境搭建、Codex CLI安装,到核心配置文件config.toml的编写与解析,并重点解决了Windows平台特有的环境变量设置、MCP服务启动命令适配等关键难点,帮助开发者顺利完成从环境准备到编辑器插件连接的整个配置过程。

weixin_28826545的博客 2075

国产数据库适配-人大金仓(kingbase V8R3)

1.KingbaseV8R6无法设置大小写敏感,查询时,表名或字段名不能用“`”符号,表字段名或别名需要用双引号括起来,否则全部会转为小写,sql语句中的出现的字符串需要用单引号标识。10.初始化数据时,如果表的主键是自增,则insert语句中不要对id列赋值,否则后续新增数据时,会报错主键冲突,原因是,手动给id赋值没有触发自增id的序列值更新。2.mysql的group_concat函数需要替换成string_agg(字段名,分隔符),写法如下。加入下面一行配置,重启数据库。6.获取当前时间的前7天。

EverythingAtOnce的博客 3455

立创星火计划:基于STM32H743VIH6的Maverick_H743_MK1.0高性能开源飞控硬件全解析

本文详细解析了基于STM32H743VIH6核心的Maverick_H743_MK1.0高性能开源飞控硬件设计。重点阐述了采用双IMU冗余设计、高精度气压计、多路独立电源管理以及丰富接口(如CAN总线)的考量,旨在为穿越机、科研无人机等平台提供强大、可靠的飞行控制解决方案。

weixin_28787801的博客 200

springBoot+liquibase+hibernate支持各种国产数据库

liquibase 继承OracleDatabase即可 会异常基本很少。liquibase继承InformixDatabase。liquibase继承PostgresDatabase。liquibase继承PostgresDatabase。liquibase继承PostgresDatabase。liquibase继承OracleDatabase。

。。。。。。。 717

别再乱短接了!OEC/OEC-turbo刷机救砖,用RKDevTool避开‘下载boot失败’的保姆级教程

本文提供OEC/OEC-turbo刷机救砖的终极指南,重点介绍使用RKDevTool避开‘下载boot失败’的详细步骤。从Loader模式的优势到硬件准备细节,再到分阶段刷机方案,帮助用户高效完成设备恢复,避免反复短接和常见误区。

weixin_29280657的博客 1108

C#上位机3D可视化:HelixToolkit.Wpf集成点云/模型(机器人臂姿态实时监控)

核心控件是3D可视化的核心,需搭配和网格辅助定位;模型加载:按关节拆分机械臂模型,通过组合平移+旋转实现姿态控制;姿态更新:将机器人关节角度转换为3D模型的旋转变换,工业场景需从控制器实时获取角度;点云渲染:通过实现点云加载,需注意坐标系转换和性能优化。

这里只有干货:从 Modbus 通信到 MES 对接,从 YOLO 训练到工控机部署,带你搞定工业软件开发全流程。 716

一文详解Hibernate

Configration接口。

优快云博客技术,java高级工程师,业务层架构师,高级管理认证,毕业设计可以联系我 1637

制作一个完整的Shopify主题

Liquid是Shopify的模板语言,用于动态渲染页面内容。Liquid是Shopify的模板语言,用于动态渲染页面内容。Shopify主题包含多个文件和文件夹,包括布局、模板、部分、配置和资产文件夹。Shopify主题包含多个文件和文件夹,包括布局、模板、部分、配置和资产文件夹。准备好你的主题后,可以将其提交到Shopify主题商店。确保你的主题符合Shopify的质量标准和指南。准备好你的主题后,可以将其提交到Shopify主题商店。确保你的主题符合Shopify的质量标准和指南。

luckucu的博客 176

国产数据库都有哪些?安全性、兼容性怎么样?java web开发应该怎么选择?

由 PingCAP 公司研发设计的开源分布式 HTAP (Hybrid Transactional and Analytical Processing) 数据库,兼容 MySQL,支持无限的水平扩展,具备强一致性和高可用等特性。:华为自主研发的分布式关系型数据库,具备企业级复杂事务混合负载能力,同时支持分布式事务,同城跨AZ部署,数据0丢失,支持1000+的扩展能力,PB级海量存储。

weixin_40914952的博客 1875

【Bug已解决】Codex 切换 model_provider 后历史会话消失的解决方案

方案适用场景推荐指数切回原 provider 验证排查的第一步,确认数据是否真的丢失⭐⭐⭐⭐⭐查看本地会话文件进一步确认数据完整性⭐⭐⭐⭐⭐查阅跨 provider 恢复命令官方是否提供了对应功能⭐⭐⭐使用社区辅助工具需要频繁切换 provider 的场景⭐⭐⭐定期备份配置目录任何场景下的通用保险措施⭐⭐⭐⭐切换后历史会话"消失"的本质是客户端的会话列表展示逻辑受当前活跃 provider 状态过滤,而不是原始数据文件被真正删除。

一键难忘的博客 6001

【RKNN】RKNN(Rockchip Neural Network)​​ 的详解

RKNN 为 Rockchip 硬件提供了高效的 AI 推理解决方案,适合需要低功耗、实时响应的边缘场景

浩瀚之水的专栏 1688

GBase 8a MPP数据库如何集成Hibernate

GBase 8a MPP数据库如何集成Hibernate

fantastic23的博客 562

自动驾驶算法-滤波器系列(三)——不同运动模型(CV、CA、CTRV、CTRA)的建模和推导

CV & CA & CTRV & CTRA1. CV模型2. CA模型3. CTRV模型4. CTRA模型 1. CV模型 2. CA模型 3. CTRV模型 4. CTRA模型

weixin_41480034的博客 2万+

国产数据库汇总

一、达梦数据库 达梦数据库管理系统是达梦公司推出的具有完全自主知识产权的高性能数据库管理系统,简称DM。达梦数据库管理系统的最新版本是7.0版本,简称DM7。 DM7采用全新的体系架构,在保证大型通用的基础上,针对可靠性、高性能、海量数据处理和安全性做了大量的研发和改进工作,极大提升了达梦数据库产品的性能、可靠性、可扩展性,能同时兼顾OLTP和OLAP请求,从根本上...

顺其自然~专栏 3万+

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

每天5分钟,带你了解GBase8a(4)——GBase8a如何使用

还记得前面咱们说的吗,gcluster是负责接受客户端连接和请求的,这里的gc-cli,连接的就是本地的gcluster。所以这个命令是需要在安装了gcluster的节点执行的。可以杀死上一步“查询用户进程/连接”所显示的进程/连接ID,前提是您已经确认了这个进程或连接是应该呗杀死的。更多的内容,且听我下回分解。请使用这种方式设置密码,这是标准的做法,请不要使用grant来设置密码。您可以使用gcadmin --help查看这个命令的具体用法。1、数据库启、停、查看服务状态。7、查看数据库里的表。

gameszy的博客 1179

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

每天5分钟,带你了解GBase8a(10)——GBase8a的智能索引

智能索引、粗粒度索引、自动建立、速度快

gameszy的博客 967

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

hibernate配置文件模板

###################### ### Query Language ### ###################### ## define query language constants / function names hibernate.query.substitutions true 1, false 0, yes Y, no N ## select

天生我才必有用 1621

Docker Compose:搭建本地多服务开发环境

从一个 Java API、PostgreSQL 和 Redis 开始,配置服务名、端口、环境变量、健康检查、数据卷和依赖关系。理解 Compose 文件如何被解析、项目如何隔离,以及哪些数据不能依赖“重建容器”保留,能够把个人开发环境整理成团队可复用的启动入口。

m0_62221377的博客 474
上一篇: 今天在北京出差,时代亿信的一个门户项目,希望周日能结束
下一篇: 《十月围城》集体合影,你认识其中几个?
老紫竹
博客等级 码龄19年 1万+粉丝 1252原创
评论 9
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值