support blob?

Feb 23, 2009 at 10:27 AM
1, Does DbEntry.Net 3.5 support blob in MySql?
2, Does DbEntry.Net delete relationtable item when delete object of the relation.
User user = GetUser(blabla);
Reader r=GetReader(blabla);
r.Delete()//is user_id, r_id in user_reader_table deleted?

i haven't yet started to use DbEntry.Net, so there maybe some function call errors, but i think you can understand it:P

3, Is there a code generator for gen classes from db in the project roadmap? and When can we expect to use it ?


Feb 23, 2009 at 10:55 AM
1.I believe DbEntry support blob in MySql, but I don't remember if I test it in MySql. If you find it doesn't please tell me.
2. DbEntry.Net doesn't delete relation items when delete object.
3.There is no such generator now. Maybe I'll build one at next release. But I think it's not the best way to use DbEntry with the existed db scheme.
Feb 23, 2009 at 11:13 AM
for question 2, how to delete relation manually, create a class of relation?
Feb 23, 2009 at 1:09 PM
User u = User.FindById(1);
foreach(Reader r in u.Readers)
Feb 24, 2009 at 4:42 AM
Edited Feb 24, 2009 at 5:32 AM
if i only want to delete a Reader, the code would be:

u.Readers.Remove(r); or u = User.FindById(1);

but if there are a lot User, what should i write:

foreach(User u in UserCollection)

this operation may be redundant, since most of user do not have the readers.

i have read former posts, it seems this code wouldn't work:

foreach(User u in r.Users)
Feb 24, 2009 at 5:36 AM
I think your code also works.
I don't care the user still have r in the collection if we want delete u and r at all.
There is no refresh method. and I think re-find the object will be more easier.
Feb 24, 2009 at 7:42 AM
Edited Feb 24, 2009 at 7:44 AM
For now, you can override Delete function to remove it from relations.
Read all the test case about relation objects will be fine since that's all DbEntry supports for it.