Closed jaydenyuhy closed 7 years ago
greenDAO works based on the notion that there is one table per entity. If you want different tables you have to create different entities.
In your case I suggest you use one table/entity and add some identifiers, like the sender and receiver, to the entity to allow querying for the messages between certain users. -ut
For some reason I want to use a different name's table to distinguish between different objects, such as chat records synchronization;Do greenDao have plans to implement one entity corresponding to multiple tables?
If I have a message entity, I want to create a message table whose name is "messagefromAToB" when a userA chat to a userB, and create a message table whose name is "messagefromAToC" when a userA chat to a userC; How can I achieve this by greenDao?