Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

etmvc在细节上有些问题 #4

Open
GoogleCodeExporter opened this issue Aug 5, 2015 · 1 comment
Open

etmvc在细节上有些问题 #4

GoogleCodeExporter opened this issue Aug 5, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

一开始觉得etmvc的思路很好,开始使用,在使用中还是发现有
些细节问题:
1,ActiveRecordBase只能取本身类的field定义,不能取基类的,这在于我想先为类表如(代码表)建个基类,然后再派生表,则
会发生取不到field;
2,ActiveRecordBase 
调用的orminfo.setFieldValue方法没有调用ActiveRecordBase 的set方法;
3,daosupport 和orminfo耦合太紧;
4,orminfo没有缓存机制,每次调用都要重新检索类定义;
5,对主从表insert、update能否给个例子;

我修改了一下orminfo,能够解决1-4问题,没有经过严格测试,可能会有问题,供参考


@GoogleCodeExporter
Copy link
Author

如果做了映射关系,调用你修改的getFieldValue方法
OrmInfo.getFieldValue(clasz, fieldName, obj) ,
则ActiveRecordProxy类的intercept方法会进入死循环,原作者直接取
field的值的方式,不会触发调用get方法

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant