8 FAQ
Marcel van der Heide edited this page 2023-01-20 08:30:09 +01:00

Frequently Asked Questions

Why do relation properties have to include the @Ignore-annotation?

During compilation Android Room detects every entity and its properties in your project. Every properties will be considered by Android Room as a column to store in the database. But Room will be unable to process relationship properties, since it doesn't know how to store these in the database, this will be done by RoomEx. In order to notify Android Room to ignore these properties, we need to add the @Ignore-annotation

What is the difference between DAO-methods with, and without "Entity" in its name?

If you create a class which implements the RoomExDao base class, you gain access to methods like: getEntityById, getEntityByIdWithChildren, updateEntityWithChildren, .... These are the methods provided by RoomEx in order to deal with relations.
Should your class also extend any of the following interfaces ICRUD<T>, ICreate<T>, IRead<T>, IUpdate<T>, IDelete<T>, IJoin<T> or IResolver<T>, you will receive access to the same methods, but without "Entity" in its name like: getById, getByIdWithChildren, updateWithChildren, .... These methods are publically callable, in contrast to the methods with "Entity" in their name.
Otherwise both methods do the same thing. In fact, the methods from the interface call the methods from the base class in the background.

After changing my entity/property name, pre-existing relations are no longer resolvable

RoomEx usages the name of the parent entity, the property name and the name of the target entity to create a new relation entity for internal use. Therefore, if renaming an entity, be sure to set the tableName argument of the @Entity annotation. When renaming the relation property, be sure to set the name argument of the relation annotation (@OneToOneEx, @OneToManyEx, @ManyToOneEx, @ManyToManyEx)

I am missing feature XY.

Please create a new issue with an in-depth description of your desired feature and a example use case.

I found a bug in RoomEx.

Please create a new issue with an in-depth description of the issue. If possible add steps to recreate the issue, any logs or a sample project.

Which version of RoomEx do I need?

RoomEx has been built using KSP for the annotation processing. KSP releases are tightly coupled to specific Kotlin versions. Therefore, the version of RoomEx must match your Kotlin version.
RoomEx versioning uses the following pattern:

RoomEx-KotlinVersion-RoomExVersion

For example: RoomEx-1.7.21-0.9.0