XML DataType AND Scope Changes

9 posts, 0 answers
  1. Thomas Kaske
    Thomas Kaske avatar
    7 posts
    Member since:
    Nov 2009

    Posted 12 Feb 2010 Link to this post

    Hello i have 3 important questions which belongs to the ORMapper.

    Well i have to store xml in my database (MS SQL Server 2005). I have a column xml in a table which has the type xml. So i can save xmldocuments inside! right now i am using the or mapper for evrerything besides the save of the xml. i save the xmldocument with a normal insert statement before i do that i have to convert the xml document in a mssqlserver xml with a reader.

    1. Now my first question is does the or mapper support the xmldatatye because when i use the mapping i can choose every datatpe besides xml!?

    2. When I insert the data in my table which has 4 columns id Guid, xml XML, date Datetime, state String. Then I want to see what i have saved the scope doesnt see the insert i made???Why???How can i force him to do that? Scope.refresh????

    3. The 3th thing ist that i also have a windows service running. this service changes the states in the table. when the service changes a state in the table thorugh the scope () dont see the change in my GUI when i want to see all data from the table. These are two complete different projects and every project has one scope.?

    I would be very glad when someone can help me.
  2. Thomas Kaske
    Thomas Kaske avatar
    7 posts
    Member since:
    Nov 2009

    Posted 16 Feb 2010 Link to this post

    I WOULD REALLY APPRECIATE to get an answer by the way. Our company didnt only buy the ORM Access Components but the Winforms too, so I can expect an answer I hope.
  3. DevCraft banner
  4. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 16 Feb 2010 Link to this post

    Hello Thomas Kaske,

    The XML datatype is not mapped to a CLR type at the moment. For such unsupported types OpenAccess can serialize them to blobs and present them as byte[] in your object model. Nevertheless I would not recommend that if you have already implemented your custom logic that takes care of the xml objects.

    Fore the 2nd and 3rd of your question, I think the answer is that you are not doing the read operations inside an OpenAccess Transaction. The reason why you do not see the objects that you have inserted is that OpenAccess uses its 1st level cache to obtain the requested objects. The cache invalidation happens with the call to scope.Transaction.Begin(). That way OpenAccess will always go to the database and get the latest states of your database records.

    With disregard to the technical questions, I would like to tell you that in case you require more rapid answer to your questions, you should send support tickets that are answered with greater priority. The answering time of the Forum posts is 72 hours and they are counted only during business days. That is the reason why this answer has seemed as a late one to you.

    All the best,
    Zoran
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. Thomas Kaske
    Thomas Kaske avatar
    7 posts
    Member since:
    Nov 2009

    Posted 19 Feb 2010 Link to this post

    Hello thank you for the answer that helped me but the question is why doesnt open access see, that i added a new data into the database through the scope? So would you recomend that after i updated inserted deleted some data and want to see it i should alwys a read inside a transaction? Is there an article where I can read that?
  6. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 25 Feb 2010 Link to this post

    Hello Thomas Kaske,

    Yes, you are right, if you want to see the fresh data after insert, update or delete operation you should always read it inside a transaction. At the moment there is no article that explains the reason behind it and we will have to add one for the following release where restructuring of the documentation will be made. Nevertheless, a short and simple explanation is that the OpenAccess caching mechanism can not detect changes in the database that are not performed by OpenAccess itself. That is why it would read the objects from its own cache even if their are modified from another process. The only way for one to be sure that the data that is being read, is the latest is to open a transaction prior to reading the data. That invalidates the cache of the object scope.

    Kind regards,
    Zoran
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  7. Christian
    Christian avatar
    81 posts
    Member since:
    Aug 2008

    Posted 12 Apr 2010 Link to this post

    Hello,
    is there a timetable for direct supporting / mapping the xml-datetype in the MS-SQL-Server? This is important question for our product planning.

    Thanks.
    Christian Rudat
  8. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 15 Apr 2010 Link to this post

    Hi Christian,
    It will be in the Q2 release, hopefully in some custom build or service pack earlier.

    Greetings,
    Jan Blessenohl
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  9. Christian
    Christian avatar
    81 posts
    Member since:
    Aug 2008

    Posted 03 Jun 2010 Link to this post

    Hello,
    is there any support for the xml-datatype in the current release?
    Thanks.
    Christian
  10. Dimitar Kapitanov
    Admin
    Dimitar Kapitanov avatar
    632 posts

    Posted 07 Jun 2010 Link to this post

    Hello Christian,
    As already mentioned on the forum post, a new type mapping and definition system is being developed at the moment. The target release is for Q2 but we are sure we will be able to show something more even earlier.
    The system will allow extendability with custom types (I hope even in its first version).
     Hope that answers your questions.

    Greetings,
    Dimitar Kapitanov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top
DevCraft banner