Hi,
I have problems with the GenericJDBCDataModel. For me, the functions getUsers() and getItems() return nothing, although the SQL queries used in the functions definitely do return results. All other functions in the DataModel work as expected.

The results of the queries used in getUsers() and getItems() look as follows:

SQL result for GenericJDBCDataModel.GET_ITEMS_SQL_KEY:

item_id
------------
itemID_A
itemID_B
itemID_C
itemID_D
itemID_E
...

SQL result for GenericJDBCDataModel.GET_USERS_SQL_KEY

item_id         callret-1               user_id
----------------------------------------------
itemID_A        1               userID_X
itemID_B        1               userID_Y
itemID_C        1               userID_Z
...

I think these results should be correct (Preferences are always 1 in my data). But the Iterables returned by both functions seem to be empty:

GenericJDBCDataModel dm = new GenericJDBCDataModel(props);
for ( Item item : dm.getItems()){
        System.out.println(item.getID()); //Never reached
}
for ( User user : dm.getUsers()){
        System.out.println(user.getID()); //Never reached
}


I should note that I query an OpenLink Virtuoso RDF store, which uses SPARQL queries enclosed in SQL queries. That means that 'columns' and 'tables' , and thus the variables DEFAULT_PREFERENCE_TABLE, DEFAULT_USER_ID_COLUMN, DEFAULT_ITEM_ID_COLUMN and DEFAULT_PREFERENCE_COLUMN of AbstractJDBCDataModel don't have any meaning. But as I understand the code, they are not required when using the GenericJDBCDataModel.

Is it possible that some exception is thrown 'silently' in the AbstractJDBCDataModel?

I have no idea where to look for the prob, so thanks for any hints....

Regards,
Mirko



Reply via email to