I have to import a large amount of data into an episerver instance. It's much too slow to do it via the API. I'm trying to update the database directly. I'm updating properties of a block, so I update tblContentProperty. The update works but I don't see the change in the CMS. So I am either updating the wrong thing, or it's somehow cached?
I don't think I am updating the wrong thing because if I update the property through the UI, I can see the property in tblContentProperty getting updated. But running the Sql query doesn't seem to get reflected in the UI.
Do I need to clear the cache somehow?
Related
I have a solr search already implemented. It showing values in the UI. Working fine. The problem here is, if i change any data in the DB, it is not reflecting in the UI. It is showing the old values. What should i do?
Every time when you change something in DB you need to re-import data
http://localhost:8983/solr/your_core_name/dataimport?command=full-import
Make sure that handlder method is defined in solrconfig.xml
To reload a core (just in case)
I suppose you're using dataImportHandler
http://wiki.apache.org/solr/DataImportHandler
You can do it via GET method.
To reload a core: http://localhost:8983/solr/admin/cores?action=RELOAD&core=your_core_name
As suggested by "Oyeme" in above answer you should update the your core document once data is updated in db.
if your using solrj client then you can add or update document in core .
link to solrj documentation
You need to update your document through code once you updated your document when it get updated in db , do commit your changes to solr core .
for committing your changes use SolrServer.commit() method this will commit your changes to core and will appear in search.
I am new to angular JS. Now I am creating an application using AngularJS + Codeigniter. I understand the basic concepts of AngularJS. I have done the basic operations like Add, View, Update, Delete records from database. Now I have several doubts.
Normally we fetch the database initially into a scope variable. All the listing is done using this JSON data. If we update a record using $http request the changes affect our database. But it does not change the data in the scope. Ideas to solve this
Made a request to the server to update the scope variable.
Just update the scope variable also along with the updating the database.
Which method should I follow?
I suggest you to use the first method. You should use another request to update the scope data. Using this approach the scope data will always be up to date with the data stored in the database. Also you have to think about what will happen if the database raises some error. If you use the second method the scope data will be temporary updated, but after refreshing the page the new changes will be lost, because nothing is stored in the database.
We are developing a web application using Oracle ADF. We have a view object based on query. we drag and dropped this view object as a table in a jsf page(suppose page1). For that table we have added a new column contains a commandImageLink.
From another page we are adding some data to DB using ADF DC, that should be reflected in page1. Actually its not working after that we googled and got solution that if I set CacheResults to false of that table Iterator in Binding layour it will work. I have set to false and reflection is happening.
But my problem is if I set CacheResults to false my commandImageLink is not working. If I set CacheResults to true my commandImageLink is working(navigation is happening).
Please help.
First of all:
I would presume that your page1 is part of a bounded task flow. If you are not, you should refactor your code and move the page in a bounded task flow. I would further presume you are using ADF Business Components for your model layer.
Second of all:
Never use CacheResults=false. That solution is a nonsense from ADF perspective.
Now, your problem is re-querying the table info on page opening, therefore:
Expose View Object Implementation for your VO. Override executeQuery() method in the newly created java class. Expose this method as client method (this should make the method PUBLIC, visible from Data Controls).
drag and drop executeQuery method into your task flow, as method action. Make sure you have this method action as the start activity of your task flow. Furthermore, make sure you are connecting executeQuery() to your page activity in the task flow. This will make sure that every time you open the page, execute query is fired.
We have a problem in updating the data lists on dashboard page after creating a new list in create page. It already saved on the database, but not updating in the views. It updates once i click the refresh button on the browser but this is a one page web app. How can I update the lists on my dashboard page after adding a data from the previous page without refreshing the page? I used couchbase for database.
The problem here is that you are loading the content from your persistent storage, and then it's in angular as-is, and to retrieve any updates you will have to re-fetch it from your persistent storage. Unfortunately, it is not as simple to $watch your back-end.
You have some options here: if you are making your change from within the angular component of the site, then you can just call a function when you are creating a new page which re-fires your db-access code, and refreshes the model.
If you are making changes from outside of angular, then you will need to either use polling to refresh your angular model periodically, or go for a fancier web-socket option, as explained here.
After reading this question and your other question, my guess would be, that you get the old view from couchbase.
Per default couchbase sets the stale parameter to update_after, which results in getting the updated view only after the second access, see the couchbase documentation for more information.
To fix this, it should be sufficient to set stale to false.
If you access couchbase via REST call, adding ?stale=false to the call should do the trick, otherwise add the parameter according to your used SDK specification.
When using Silverlight together with a WCF Services library how do you solve the age old possibility of two different users loading a record, making different changes to that record and then updating. In other words when updating how does the WCF service know that the data it retrieved is the same as the data it fetched before applying an update?
Do you need to check the original loaded values against the values in the database (i.e. recall the original query before updating)?
I was hoping that there would be a more out-of-the-box answer.
Do you mean using EntityFramework? If so, here is the strategy I used :
When retrieving data on the client side you see that the "RowState" property of the entity is gone. What I did is I added the property on the client side using the "partial class" feature. And I manage locally the value of that RowState value.
When the data goes back to the server for update only send what has been modified filtering by the "RowState" property.
On your Update method, call the ApplyCurrentValues() method of the object.
Maybe there is a better solution for that, but that's what I am using on my project; and it works well on my case :)
Good luck