Open perqin opened 7 years ago
Could reproduce, thanks. As it apparently does not work automatically, try to explicitly add the join property for Progress
like:
private Long uploadProgressId;
@ToOne(joinProperty = "uploadProgressId")
private Progress uploadProgress;
Then rebuild your project.
Note though, that greenDAO requires special implementations for the getUploadProgress()
and setUploadProgress()
methods. So temporarily remove the generateGettersSetters
flag to generate them.
-ut
I'm facing the same issue. I tried the Order-Customer example you provide, but the query always returns the @ToOne
property as NULL. Do you have any valid project example showing how it should be done?
I'm facing the same issue
Simply put, I have two entities
Live
andProgress
, and eachLive
has aProgress
. Here's my entity classes (generated code, static constants and transient fields are ignored):The problematic code is:
The problem is that the id of
Progress
are not included when the newLive
is inserted. I've pulled out the SQLite file from my device and opened it. I found that theUPLOAD_PROGRESS
column isnull
.I think this is due to incorrectly generated DAO classes. Here's the
bindValues
method generated inLiveDao
class:You can see that the
uploadProgress
is not bound to the insert SQLite statement.