GreenDAO - primary key on multiple columns
转:http://stackoverflow.com/questions/15250609/greendao-primary-key-on-multiple-columns
Does GreenDAO support primary key on multiple columns?
I'm using Property's method primaryKey() on two columns but it doesn't work. I'm getting exception:
Caused by: android.database.sqlite.SQLiteException: table "table" has more than one primary key
How to create primary key on multiple columns? Should I edit generated DAO classes?
=======================================================================
The documentation says:
Currently, entities must have a long or Long property as their primary key. [...] To work around this issue, you can use a long primary key and use an unique index for the intended “key” properties.
GreenDAO - primary key on multiple columns的更多相关文章
- 分区实践 A PRIMARY KEY must include all columns in the table's partitioning function
MySQL :: MySQL 8.0 Reference Manual :: 23 Partitioning https://dev.mysql.com/doc/refman/8.0/en/parti ...
- 1503 - A PRIMARY KEY must include all columns in the table's partitioning function
1503 - A PRIMARY KEY must include all columns in the table's partitioning function 错误的原因:表的主键字段必须包含分 ...
- Error Code: 1068. Multiple primary key defined
1.错误描述 10:10:38 alter table user add num int(8) primary key first Error Code: 1068. Multiple primary ...
- mysql:[Err] 1068 - Multiple primary key defined
添加主键时,出现错误:[Err] 1068 - Multiple primary key defined #增加主键 ) not null; ; alter table my_test add pri ...
- Database Primary key and Foreign key [From Internet]
Database Primary key and Foreign key --Create Referenced Table CREATE TABLE Department ( DeptID int ...
- MySQL Crash Course #01# Chapter 1. 2 概念. Primary key
索引 database table schema Primary Key MySQL 书的第一章介绍一些基本的概念.理解数据库是掌握 MySQL 非常重要的一个部分. 第二章简单介绍了 MySQL 以 ...
- Hibernate Id Generator and Primary Key
Use automate id by hibernate: If you want the tables' id be created automation. How to do it? When u ...
- primary key与unique的区别
定义了 UNIQUE 约束的字段中不能包含重复值,可以为一个或多个字段定义 UNIQUE 约束.因此,UNIQUE 即可以在字段级也可以在表级定义, 在UNIQUED 约束的字段上可以包含空值.ORA ...
- 【原创】大数据基础之Kudu(3)primary key
关于kudu的primary key The primary key may not be changed after the table is created. You must drop and ...
随机推荐
- JavaScript Cookies,创建,获取cookies value
什么是cookie? cookie 是存储于访问者的计算机中的变量.每当同一台计算机通过浏览器请求某个页面时,就会发送这个 cookie.你可以使用 JavaScript 来创建和取回 cookie ...
- [项目实施失败讨论Case] “凭心而论,在这家公司很敬业的工作了3年多,老板最后给我下的评语,大家都看看吧,千万别和我走同一条路!”(摘自csdn)
[Case] “凭心而论,在这家公司很敬业的工作了3年多,老板最后给我下的评语,大家都看看吧,千万别和我走同一条路!”(摘自csdn) 原文:http://community.csdn.net/Exp ...
- Python学习笔记(七)—— 循环
一.for ... in ... 循环 1.语法 names = ['Michael', 'Bob', 'Tracy'] for name in names: print(name) (1)需要有冒号 ...
- 微信支付HTTPS服务器证书验证指引
1. 背景介绍 2. 常见问题 3. 验证证书 4. 安装证书 背景介绍 微信支付使用HTTPS来保证通信安全, 在HTTPS服务器上部署了由权威机构签发的证书, 用于证明微信支付平台的真实身份. 商 ...
- System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded
昨天客户跟我说,突然一个页面频繁地报ThrowIfMaxHttpCollectionKeysExceeded这个异常.而且是数据量大的时候报错,数据量小的时候OK. 根据异常的名称也能看得差不多超过了 ...
- SharePoint自动化部署,利用SPSD工具包
目录 怎样使用SPSD 配置Environment XML文件 PowerShell激活Feature 上篇博客讲了利用PowerShell导出.导入AD中的Users.这篇介绍简单介绍一下SPSD ...
- debian 8 解压安装mysql(版本5.7.19)
debian 8 解压安装mysql(版本5.7.19)一.下载 根据目标主机的型号官网下载mysql安装包如: mysql-server_5.7.19-1debian8_amd64.deb-bund ...
- STM8的数据@near @tiny定义
总是记不住这个:stm8 stvd下 near等于51的xdata tiny等于51的idata http://www.waveshare.net/article/STM8-3-1-10.htm 如何 ...
- 查看mysql状态的常用命令
在mysql客户端输入"show status"之后将会看到如下输出: 如果想要查看某个具体的值,可以使用如下命令: show status LIKE "%具体变量%&q ...
- 自适应滤波:维纳滤波器——LCMV及MVDR实现
作者:桂. 时间:2017-03-24 06:52:36 链接:http://www.cnblogs.com/xingshansi/p/6609317.html 声明:欢迎被转载,不过记得注明出处哦 ...