OpenAccess Classic with the Domain Model at the same time

5 posts, 1 answers
  1. Vitaliy
    Vitaliy avatar
    36 posts
    Member since:
    Dec 2008

    Posted 05 Dec 2013 Link to this post

    Dear OpenAccess team.

    I'm working on an old project that used the "classic" model widely. 
    with the ObjectScope, etc..
    The used library version is rather old - 2012.1.301.2

    Now I want to slowly move it to the new model.
    I want to start to add new classes without typing that [FieldAlias("")] and mapping field to filed.
    Unfortunately, after adding a new model (the and *.rlinq file) I cannot get my project properly working, because the enhancer doesn't make the old classes as persistent.
    Were can I get an instruction how to make them working together please?

    It would be ideally if the old fashion classes could be referenced to the new classes generated with the wizard.
    Is it possible?

    Many thanks.
  2. Ady
    Admin
    Ady avatar
    588 posts

    Posted 09 Dec 2013 Link to this post

    Hi Vitaliy,

     Have you had a look at the conversion wizards that can help convert the 'classic' OpenAccess projects to the 'Domain Model' approach? 
    Do let me know if you face any issues in converting your project or need assistance there.

    Regards,
    Ady
    Telerik
    OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
  3. DevCraft banner
  4. Vitaliy
    Vitaliy avatar
    36 posts
    Member since:
    Dec 2008

    Posted 09 Dec 2013 Link to this post

    Hi Ady,

    Thanks for you link. Yes, that is a nice conversion wizard. And, yes, I looked on it of course.

    However, maybe because we used some tricks, even an OpenAccess upgrade caused a few bugs every time.
    We do plan to do that conversion in the next year, but then we will need to do a full functional testing of the system.

    So, back to my questions.
    Is that possible to use new and old mapping together?
    I thought the new model was just a nice looking wrapper on your old core, and the enhancer is the same.
    Or maybe it would be too much complex?

  5. Answer
    Ady
    Admin
    Ady avatar
    588 posts

    Posted 10 Dec 2013 Link to this post

    Hi Vitaliy,

    The new domain model approach is basically based on the same core runtime but the upper mapping layers are completely new and rewritten. Also the enhancer previously was executed as a post-build step in Visual Studio and with the domain model approach it is executed as an msbuild task which works against the 'new' metadata. So the answer to your question is no, it is not possible for both approaches to work together.

    Which part of the old model do you want to retain? If you can reverse map the database using the domain model approach and generate the classes you can still have your existing business logic, if any, in partial classes.The main work would be in tweaking the mapping between the object model and the relational model, in the designer.


    Regards,
    Ady
    Telerik
    OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
  6. Vitaliy
    Vitaliy avatar
    36 posts
    Member since:
    Dec 2008

    Posted 10 Dec 2013 Link to this post

    Hi Ady,

    Clear.

    Many thanks.
Back to Top
DevCraft banner