I have narrowed it down to be a caching issue. When data is read from the database everything is fine, but after af publish, then the next time it reads it from the cache, and here everything is strings:
Problem is in RepositoryBase:
public TEntity Get(TId id)
{
Guid key = id isint ? ConvertIdToGuid(id) : ConvertStringIdToGuid(id.ToString());
var rEntity = _cache.GetById(typeof(TEntity), key);
if (rEntity != null)
{
return (TEntity)rEntity;
}
var entity = PerformGet(id);
if (entity != null)
{
_cache.Save(typeof(TEntity), entity);
}
Weird InvalidCastExceptions when using ContentService
Hi There
I am using umbraco 6.1.1
I have a webservice which is retrieving some data from Umbraco using the contentservice, like this:
I have several issues:
1. The where statement is not very elegant. It is basically some date fields i need to check on
2. The last line rs.GetValue<int> sometimes fails
The problem is that sometimes Umbraco thinks that all the fields are strings, and sometimes they are having the correct datatype.
Obviuosly i want the datatypes to be correct all the time. ANybody that have anything that can help here?
br
Michael
Hi Again
Just discovered that on first rebuild in Visual Studio it works. After that it fails. Very strange???
I am using VS 2010, and the Nuget package for the binary, and a MVC 4.0 project
I have narrowed it down to be a caching issue. When data is read from the database everything is fine, but after af publish, then the next time it reads it from the cache, and here everything is strings:
Problem is in RepositoryBase:
Hi,
I'm having the same kind of issues with the mediaservice, using Umbraco 6.0.6.
Has there been a solution/fix for this problem by now?
regards
Benoit
Yes it is fixed in 6.1.4
is working on a reply...