-
Notifications
You must be signed in to change notification settings - Fork 16
@BindDaoMany2Many
xcesco edited this page Apr 26, 2018
·
3 revisions
This annotation allows to easily manage many 2 many relationships. You can read Many-to-many page for a detailed explanation how it works.
-
idName: allows to specify primary key name. Default value is
id
. -
tableName: Name of the table, in SQLite style (with words underline separator). It will be converted during creation of table. If
null
(default value), the name of the table will be the transformed class name. -
where: where condition. It is possible to specify a parameter bound to method's parameter with the syntax
${<parameter name>}
. - entity1: referred entity 1.
- entity2: referred entity 2.
-
methods: if
true
(default value), it will generate standard methods for the dao:- Insert bean
- Select bean by foreign key 1
- Select bean by foreign key 2
- Select bean by id
- Delete bean by foreign key 1
- Delete bean by foreign key 2
Suppose we want to put in relation two entities: Person
and City
. @BindDaoMany2Many allows easily to define a relation between them simply creating the following DAO interface:
@BindDaoMany2Many(entity1 = City.class, entity2 = Person.class)
public interface City2PersonDao {
}
- Introduction
- Goals & Features
- Kotlin
- Immutable or Mutable Pojo
- Annotation Processor Args
- Credits
- Articles
- Benchmarks
- Setup
- Tutorial
- Usage
- Dependencies and inspirations
- Stackoverflow
- Documentation
- SQL logging
- Data source options
- Indices
- SQL Type adapter
- Global SQL Type adapter
- Constraints
- Live data: welcome Architectural components!!
- Paged Live data
- Dynamic parts
- Transactional and batch operations
- Async Transactional and batch operations
- Global transaction
- Support for immutable POJO
- Generate Content provider
- Generate Database schema generation
- Database migration
- BindSqlColumn
- BindContentProvider
- BindContentProviderEntry
- BindContentProviderPath
- BindDao
- BindDaoMany2Many
- BindDataSource
- BindDataSourceOptions
- BindDataSourceUpdateTask
- BindIndex
- BindSqlRelation
- BindSqlAdapter
- BindSqlChildSelect
- BindSqlDelete
- BindSqlDynamicOrderBy
- BindSqlDynamicWhere
- BindSqlDynamicWhereParams
- BindSqlInsert
- BindSqlPageSize
- BindSqlParam
- BindSqlSelect
- BindSqlUpdate
- BindSqlType
- BindSqlTransaction