This is a migrated thread and some comments may be shown as answers.

OpenAccess Classic with the Domain Model at the same time

4 Answers 42 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Vitaliy
Top achievements
Rank 1
Vitaliy asked on 05 Dec 2013, 09:12 PM
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.

4 Answers, 1 is accepted

Sort by
0
Ady
Telerik team
answered on 09 Dec 2013, 03:35 PM
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!
0
Vitaliy
Top achievements
Rank 1
answered on 09 Dec 2013, 04:26 PM
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?

0
Accepted
Ady
Telerik team
answered on 10 Dec 2013, 09:21 AM
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!
0
Vitaliy
Top achievements
Rank 1
answered on 10 Dec 2013, 02:41 PM
Hi Ady,

Clear.

Many thanks.
Tags
General Discussions
Asked by
Vitaliy
Top achievements
Rank 1
Answers by
Ady
Telerik team
Vitaliy
Top achievements
Rank 1
Share this question
or