Page 1 of 1

One To One association won't compile

Posted: Tue 25 May 2010 09:54
by jonsidnell
Hi

I have the following schema in my database:

Image

Which I have mapped to LinqToSQL classes using EntityDeveloper as follows:

Image

The association between User and NewsletterOption is a one-to-one association, with the following properties:

Image

I cannot now build this solution as doing so produces the following set of errors:
1. 'Models.NewsletterOption' does not contain a definition for 'Remove' and no extension method 'Remove' accepting a first argument of type 'Models.NewsletterOption' could be found (are you missing a using directive or an assembly reference?)

2. 'Models.NewsletterOption' does not contain a definition for 'Add' and no extension method 'Add' accepting a first argument of type 'Models.NewsletterOption' could be found (are you missing a using directive or an assembly reference?)

3. 'Models.User' does not contain a definition for 'Remove' and no extension method 'Remove' accepting a first argument of type 'Models.User' could be found (are you missing a using directive or an assembly reference?)

4. 'Models.User' does not contain a definition for 'Add' and no extension method 'Add' accepting a first argument of type 'Models.User' could be found (are you missing a using directive or an assembly reference?)
If I specify it as a one-to-many association, it compiles fine, but this really is a One-To-One association, and don't want to have to fudge it as a OneToMany.

Any ideas where I'm going wrong?

Thanks
Jon

Posted: Tue 25 May 2010 11:46
by AndreyR
Could you please upgrade to the latest build of the product you are using?
We have already fixed this problem several builds ago.
Please let us know if the problem persists.

Posted: Tue 25 May 2010 12:10
by jonsidnell
Hi

I've just installed v. 5.50.79 of dotConnect for MySql and the problem is still occurring.

Is there a newer version I should have got?

Thanks
Jon

Posted: Tue 25 May 2010 12:19
by jonsidnell
I've just ransacked my emails to see that there is a much newer version I can get under the annual subscription I have.

I'll grab that and see how it goes.