On 15 Jun 2004, Michel Thadeu said:

> The problem is that the database changes (every time, outside the
> webware) and the data shown in the Search are not changed. I have some
> similar problem in another project, in this case, the database donīt
> change every time but when I change it by using
> SomeTable.get(x).set(...), some sectors of the page have the proper
> data and some sections not.
> 
> What can I do, please? Thanks for any help :)

You're right, your problem is caching. SQLObject caches any object that 
you retrieve from the database, or insert into the database.

In the case where the database is getting modified externally, you have 
to turn off caching. There's an attribute you can set for your SQLObject 
class. From the documentation:

_cacheValues:
        If set to False then values for attributes from the database 
won't be cached. So everytime you access an attribute in the object the 
database will be queried for a value. If you want to handle concurrent 
access to the database from multiple processes then this is probably the 
way to do so. You should also use it with transactions (it is not 
implied).

It's kinda unfortunate that this is the solution, but there you are.

Does anyone know if there's a way to update or retrieve multiple 
attributes with a single function call, so that when caching is disabled, 
it will only have to do one SQL query instead of one query per attribute?



-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to