开发者

Is there anything wrong with this ORM? [closed]

开发者 https://www.devze.com 2022-12-18 07:06 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 12 years ago.

Roughly a month ago (after christmas) i found this post and realized how useful reflection is. So i decided to learn and got carried away and spent around 10days on this which became a ORM for sql(ite).

My question is, is there anything wrong with this ORM is used? I never used an ORM before and i heard you should not write one yourself. I dont see what is wrong with mine except maybe lacking functionality compared to others. So what is wrong with this ORM? (Links below)

The idea was i should write class normally, avoid tagging fields with attribute as much as possible and to insert extremely easy. I though update logic 开发者_开发知识库may be too complex and the user really should write the queries instead of assuming, getting things wrong or play a game of how to tag the class. So theres none of that, just simple inserts and filling up your own queries if its trivial. I wrote a tutorial for my friend 2 weeks ago. It seems to compile and run, so judging by that what is wrong with my ORM?

http://codepaste.net/29xkub

http://codepaste.net/qnrira

Also i dont want to continue this and have it grow. So far i used it in 3 projects and had no problems but is there another ORM that does what this does? foreign keys are a must and ATM i dont have this implemented solely because i am waiting for http://sqlite.phxsoftware.com/ to update to 3.6.19+


The only reason for not writing one yourself is similar to why you would use the .net framework - it's already been done, probably been used in anger in a number of projects and has probably dealt with whatever edge cases you have not thought of...

0

精彩评论

暂无评论...
验证码 换一张
取 消