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 ...
随机推荐
- ThinkPHP+jQuery EasyUI Datagrid查询数据的简单处理
ThinkPHP和jQuery EasyUI这两个都是不错的框架,现在要把它两个整合到一块,做个简单的Ajax调用查询. 在ThinkPHP模板中引入EasyUI的相关文件,然后设置按钮3的调用: & ...
- find -exec 与xargs 区别
find . -name "*.txt" -exec rm {} \;find . -name "*.txt" | xargs rm {} -exec 1 ...
- 【Spring】Spring框架如何集成Hibernate框架
下面个整理一下hibernate和Spring框架的结合. 首先是引入hibernate框架的包.Spring框架的包.数据库驱动包. User.java文件 package cn.shop.bean ...
- ASP.NET Core Linux环境安装并运行项目
原文地址:https://blog.csdn.net/u014368040/article/details/79192622 一 安装环境 1. 从微软官网下载 Linux版本的.NetCoreSd ...
- SQL如何获得本季度第一天、一年的第一天、本月的最后一天
nterval 参数,具有以下设定值: 设置 描述 Year yy, yyyy 年 quarter qq, q 季 Month mm, m 月 dayofyear dy, y 一年的日数 Day dd ...
- preg_match用法
preg_match 利用 preg_match(),我们可以完成字符串的规则匹配.如果找到一个匹配,preg_match() 函数返回 1,否则返回 0.还有一个可选的第三参数可以让你把匹配的部分存 ...
- c2java select algorithm
对于非常多应用来说,随机算法是最简单的或者最快的.既简单又快的有没有呢? 那须要深刻的洞察力或者革命性的突破. 什么是随机算法 随机算法与确定算法差别是:它还接收输入随机比特流来做随机决策. 对于同一 ...
- Oracle 客户端连接时报ORA-01019错误总结
在.net+oracle开发中,发布web程序的时候,有是会遇到该错误 ora-01019 ORA-01019 unable to allocate memory in the user sideCa ...
- C#基础第二天-作业-九九乘法表-打印星星
一.打印九九乘法表图形为下列效果图中的三角型的一种例: 图一效果1*1=1 1*2=2 2*2=4 1*3=3 2*3=6 3*3=9 1*4=4 2*4=8 3*4=12 4*4=16 1*5=5 ...
- ARM:移动GPU往PC GPU效能迈进
行动装置的热潮持续不退,各大手机制造商除了想尽办法推出外型酷炫的行动装置设备来吸引消费者的目光之外,更在行动应用处理器玩起多核心的「核」战争,无非是希望能够带给消费者更优异的效能新体验.然而,随着消费 ...