orm

DevArt Entity Developer v6.6.894

纵然是瞬间 提交于 2020-01-27 04:13:04
  Entity Developer是ADO.NET实体框架,NHibernate,LinqConnect,Telerik数据访问和LINQ to SQL的强大ORM设计器。 它引入了设计ORM模型的新方法,提高了生产率,并促进了数据库应用程序的开发。 各种.NET ORM的可视设计器 Entity Developer可以帮助您在一个统一的界面中为各种.NET ORM设计模型。您可以通过一种工具获得对所有ORM的支持,也可以购买单独的版本,与其中一种受支持的ORM一起使用。 发展更快 通过拖放操作直观地设计数据访问层,然后自动生成代码。或者只需几分钟即可从数据库生成模型,反之亦然。 减少错误 自动化数据访问层生成可帮助您减少代码中的错误。我们的代码生成模板已使用了多年,并被数百个用户使用。 专业工具 Devart为.NET数据访问开发解决方案已有15年的时间,而我们的ORM设计师在市场上已有9年的时间。它是由经验丰富的开发人员创建的专业工具,旨在使您的工作效率更高。   w:bill199855 来源: CSDN 作者: SEO-狼术 链接: https://blog.csdn.net/weixin_45330297/article/details/103780197

Spring Boot (三): ORM 框架 JPA 与连接池 Hikari

时光怂恿深爱的人放手 提交于 2020-01-26 23:22:36
前面两篇文章我们介绍了如何快速创建一个 Spring Boot 工程 《Spring Boot(一):快速开始》 和在 Spring Boot 中如何使用模版引擎 Thymeleaf 渲染一个Web页面 《Spring Boot (二):模版引擎 Thymeleaf 渲染 Web 页面》 ,本篇文章我们继续介绍在 Spring Boot 中如何使用数据库。 1. 概述 数据库方面我们选用 Mysql , Spring Boot 提供了直接使用 JDBC 的方式连接数据库,毕竟使用 JDBC 并不是很方便,需要我们自己写更多的代码才能使用,一般而言在 Spring Boot 中我们常用的 ORM 框架有 JPA 和 Mybaties ,本篇文章我们要介绍的就是 JPA 的使用姿势。 说道使用 ORM 框架,就不得不顺便聊一下连接池,市面上很多成熟的数据库连接池,如 C3P0 、 Tomcat 连接池、 BoneCP 等等很多产品,但是我们为什么要介绍 Hikari ?这个要从 BoneCP 说起。 因为,传说中 BoneCP 在快速这个特点上做到了极致,官方数据是C3P0等的25倍左右。不相信?其实我也不怎么信。可是,有图有真相啊,传说图片来源于官网,然而笔者在官网并没有找到,大家看一下: 看起来是不是完全吊打,但是当 HikariCP 横空出世以后,这个局面就被完全改写了,

.NET(C#)有哪些主流的ORM框架

一曲冷凌霜 提交于 2020-01-26 07:46:21
前言 在以前的一篇文章中,为大家分享了《什么是ORM?为什么用ORM?浅析ORM的使用及利弊》。那么,在目前的.NET(C#)的世界里,有哪些主流的ORM,SqlSugar,Dapper,Entity Framework(EF)还是ServiceStack.OrmLite? 或者是你还有更好的ORM推荐呢? 如果有的话,不防也一起分享给大家。 .NET(C#)主流ORM总揽 今天这篇文章分享几款收集的目前.NET(C#)中比较流行的ORM框架,比如(以下框架均为开源框架,托管于github上): SqlSugar (国内) Dos.ORM (国内) Chloe (国内) StackExchange/Dapper (国外) Entity Framework (EF) (国外) NHibernate (国外) ServiceStack/ServiceStack.OrmLite (国外) linq2db (国外) Massive (国外) PetaPoco (国外) SqlSugar SqlSugar是国人开发者开发的一款基于.NET的ORM框架,是可以运行在.NET 4.+ & .NET CORE的高性能、轻量级 ORM框架,众多.NET框架中最容易使用的数据库访问技术。 特点: 开源、免费 国内开发者开发、维护; 支持.NET Core; 支持主流数据库,如:SQL Server

Django ORM 常用字段和参数

十年热恋 提交于 2020-01-26 02:13:48
1、常用字段 AutoFiled int自增列,必须填入参数 primary_key=True。当model中如果没有自增列,则自动会创建一个列名为id的列。 IntegerField 一个整数类型,范围在 -2147483648 to 2147483647。(一般不用它来存手机号(位数也不够),直接用字符串存,) CharField 字符类型,必须提供max_length参数, max_length表示字符长度。 这里需要知道的是Django中的CharField对应的MySQL数据库中的varchar类型,没有设置对应char类型的字段,但是Django允许我们自定义新的字段,下面我来自定义对应于数据库的char类型 自定义char字段: from django.db import models class MyCharField(models.Field): def __init__(self, max_length, *args, **kwargs): self.max_length = max_length super().__init__(max_length=max_length,*args, **kwargs) def db_type(self, connection): return 'char(%s)' % self.max_length class

JPA Hibernate two foreign keys to the same table

我只是一个虾纸丫 提交于 2020-01-25 20:29:46
问题 I've found two topics this and this, but still cannot populate it to my case. I have an Account . I can do Payments from one account to another. For that purpose I want to store payer_account_id and receiver_account_id in Payments table. How can I map that using Annotations? @Entity public class Account { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private Double balance; //mapping here to Payments Entity private ??? } @Entity public class Payments { @Id

Convert simple SQL query to JPA… OneToMany Relationship

落爺英雄遲暮 提交于 2020-01-25 20:20:19
问题 I have a JPA (Hibernate) model...One object contains a List of other objects. If i want to run a SQL query to search BOTH objects it is relatively straightforward, I do a LEFT JOIN and do a simple LIKE %searchString% on all columns. SELECT * FROM my_db.person LEFT JOIN my_db.record ON record.person_pk WHERE .... ; I cannot convert this to a JPA style query.. The model is like this @Access(AccessType.FIELD) @Entity @Table(name = "person") public class Person { @Column(nullable = true) private

Node.js中的ORM

情到浓时终转凉″ 提交于 2020-01-25 19:11:27
ORM2是一款基于Node.js实现的ORM框架,名字相当的霸气,算是同类框架中非常出色的一款,具体介绍请猛击: https://github.com/dresende/node-orm2 刚接触Node.js + MySQL,在引入项目之初,受Asp.Net经验的影响,产生了许多不小的麻烦。下面是我定义的一个BaseProvider,作为所有DB Provider的父类,提供了一些公共的方法和属性。 function BaseProvider() { this.table_name = {}; this.properties = {}; this.opts = {}; this.getProviderModel = function (callback) { define(this.table_name, this.properties, this.opts, function (error, model) { callback(error, model); }); }; }; var define = function (name, properties, opts, callback) { ORM.connect(pomelo.app.get("mysql"), function (error, db) { if (error) { logger.error(error);

Update existing records in Hibernate ManyToMany Relation

陌路散爱 提交于 2020-01-25 12:49:26
问题 In my database I have two tables Book and Label with ManyToMany relation between them. I have mapped them successfully in Hibernate using annotation of ManyToMany with CascadeALL . Now consider this scenario. When I add a new Book with labels list. The list of label contain existing and new labels both. When the book is saved in the database it creates duplicate entries of existing labels. [Means each time a new label will be created (even for existing labels)with different primary key,rather

Update existing records in Hibernate ManyToMany Relation

烈酒焚心 提交于 2020-01-25 12:49:05
问题 In my database I have two tables Book and Label with ManyToMany relation between them. I have mapped them successfully in Hibernate using annotation of ManyToMany with CascadeALL . Now consider this scenario. When I add a new Book with labels list. The list of label contain existing and new labels both. When the book is saved in the database it creates duplicate entries of existing labels. [Means each time a new label will be created (even for existing labels)with different primary key,rather

Splitting a ManyToMany association into 2 pairs of OneToMany/ManyToOne (Doctrine)

耗尽温柔 提交于 2020-01-25 12:27:25
问题 I'll expose the case with the example (it'll be clearer): I have 'Groupies' (since group is a reserved name) and I have Companies. A Groupie may choose several Companies, and the same aplies in reverse (typical ManyToMany asociation). The thing is: I need to persist some additional data wich are specific of the association itself (let's call it 'Choice'). So, the ManyToMany is replaced by two pairs of OneToMany/ManyToOne asociations, and now each 'choice' has only one 'groupie' and one