Closed Trellian closed 8 years ago
Hi Adrian,
Could you paste the source of "BaseObservable" also?
Cheers, Sam
Hi Sam,
You can see the source here: https://android.googlesource.com/platform/frameworks/data-binding/+/c9a5d6f140f732ca0ff279a4b1ee315072e1c422/library/src/main/java/android/databinding/BaseObservable.java
Thanks for the quick response!
/Adrian
On 02 Sep 2016 11:34, Samuel Kirton wrote:
Hi Adrian,
Could you paste the source of "BaseObservable" also?
Cheers, Sam
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/memtrip/SQLKing/issues/14#issuecomment-244329223, or mute the thread https://github.com/notifications/unsubscribe-auth/ABCOrHj89qUoypJUc3-pBWToCJ-2RyqWks5ql-2LgaJpZM4JzfYh.
BaseObservable is being used because I'm using the new 2-way DataBinding features, instead of Butterknife
/Adrian
On 02 Sep 2016 11:34, Samuel Kirton wrote:
Hi Adrian,
Could you paste the source of "BaseObservable" also?
Cheers, Sam
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/memtrip/SQLKing/issues/14#issuecomment-244329223, or mute the thread https://github.com/notifications/unsubscribe-auth/ABCOrHj89qUoypJUc3-pBWToCJ-2RyqWks5ql-2LgaJpZM4JzfYh.
I have tried this in Q.Java (starting at line 167 - in retrieveSQLSelectResults):
I'm building a list of columns already processed for the table, to avoid generating duplicates.
for (int i = 0; !cursor.isAfterLast(); i++) {
${packagedTableName} ${table.getName()?lower_case} = new ${packagedTableName}();
<#assign colsProcessed=[]>
<#list table.getColumns() as column>
<#if column.isJoinable(tables) >
<#if colsProcessed?seq_contains(column.getName()) != true>
${joinReferences(table.getName(),tables)}
<#assign colsProcessed = colsProcessed + [column.getName()]>
</#if>
</#if>
</#list>
Preprocessor builds fine, but final Q.Java doesn't generate now, so obviously I've made a stupid mistake.
If the final Q doesn't generate it will be a FreeMarker issue, if you build the project with mvn clean install -X
it should be logged.
Also is 2 way binding available in the support library?
I've got the final Q to generate now, it still has the double declarations, but FreeMarker seems happy for now.
One thing that concerns me is that the Maven Install installs to: C:\Users\Adrian.m2\repository\com\memtrip\sqlking\preprocessor\1.0.15\preprocessor-1.0.15.jar
And it looks like my gradle build of my project is using what it has in it's cache at
C:\Users\Adrian\m2repository\com\memtrip\sqlking\preprocessor\1.0.15\preprocessor-1.0.15.jar
I couldn't find a way to point either one to a consolidated maven repository.
Have you experienced this before?
Regards, Adrian
On 02 Sep 2016 11:56, Samuel Kirton wrote:
If the final Q doesn't generate it will be a FreeMarker issue, if you build the project with |mvn clean install -X| it should be logged.
Also is 2 way binding available in the support library?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/memtrip/SQLKing/issues/14#issuecomment-244334152, or mute the thread https://github.com/notifications/unsubscribe-auth/ABCOrHSdDh9rjRb4ysSBuQE1zEwT6E6Aks5ql_LLgaJpZM4JzfYh.
On the client project it might be worth using:
gradle build --refresh-dependencies
Also its probably best if you stash your changes and see if you can reproduce the issue, it might have been fixed in 1.1, 1.0.15 is quite old!
I'm a bit confused here... it turns out that I was indeed using 1.1, but changes to my local 1.0.15 showed up as compile errors in my client project?
Anyway, I have moved to 1.1, the original problem still exists with the duplicate declarations.
Any Ideas?
Thanks, Adrian
Hi Adrian,
Please see the fix/duplicate_relationships branch, the issue has been fixed. I will push a release to maven central tonight.
Cheers, Sam
Hi Sam, Did you get a chance to push a release to Maven?
Thanks, Adrian
All deployed.
Cheers, Sam
Thanks Sam, works like a charm!
Hi Sam,
I have a table that has two FK's in it as follows:
and in Q.Java, I get an error on duplicate symbols as follows:
You can see that 'tblentry' and 'tblvisitor' variables are being declared twice. I have had a look at the preprocessor template source for Q.Java but can't see how it could be happening. I'm currently taking a shot at fixing it, but not having much success.
Please can you take a look?
Thanks, Adrian