Hey guys - I downloaded the latest svn trunk tonight and compiled
everything under 'release mode' in visual studio 2008 then imported it
all in my project.

My mySql db has a table that has two foreign keys in the same table
and I think it might be messing it up.

I kept getting storage = null errors whenever i tried a statement like
this:

from s in context.ItemTable
                          select s;

but it would work if i did this:

from s in context.ItemTable
                          select new { s.itemType, s.itemValue };

I looked in my generated .cs file (from my newly compiled dbMetal.exe)
and i found two instances (my two fk's) that looked like this:

    [Association(Storage = null, OtherKey = "PlayerID", Name =
"playeritem_table_ibfk_2")]
        [DebuggerNonUserCode]
        public EntitySet<PlayerItemTable> PlayerItemTable
        {
                get;set;
        }

I also found two instances that looked like this:

        private System.Data.Linq.EntityRef<PlayerTable> _playerTable;
        [Association(Storage = "_playerTable", ThisKey = "PlayerID", Name =
"playeritem_table_ibfk_2", IsForeignKey = true)]
        [DebuggerNonUserCode]
        public PlayerTable PlayerTable
        {
                get
                {
                        return _playerTable.Entity;
                }
                set
                {
                        _playerTable.Entity = value;
                }
        }

when i replaced null with "_playerTable" in the top instance (and
repeated it with the other fk i had) it appears to have fixed the
problem



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to