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

同库多表情况,API 风格咨询? #18

Closed
automvc opened this issue Jul 27, 2020 · 1 comment
Closed

同库多表情况,API 风格咨询? #18

automvc opened this issue Jul 27, 2020 · 1 comment
Labels
good first issue Good for newcomers

Comments

@automvc
Copy link
Owner

automvc commented Jul 27, 2020

在一个DB中,随着数据量不断增长,需要将老的数据移到历史表中。
如,订单表orders,将5月,6月数据移到 orders_202005,orders_202006,结构与表orders一样。
如何用同一javabean,同时映射多个数据表?
API如何设计才能使用更加方便?

欢迎把你的好想法留下!

@automvc automvc added the doing label Aug 2, 2020
@automvc
Copy link
Owner Author

automvc commented Aug 2, 2020

example:

`
Suid suid=BeeFactory.getHoneyFactory().getSuid();

// @table("Orders_${month}")
// public class Orders

	Orders orders=new Orders();
	suid.setDynamicParameter("month", "202007").select(orders);

// @entity("LeafAlloc${version}")

	LeafAlloc leafAlloc=new LeafAlloc();
	List<LeafAlloc> list1=suid.setDynamicParameter("version", "2").select(leafAlloc);
	
	suid.setDynamicParameter("version", "2");
	List<LeafAlloc> list2=suid.select(leafAlloc);

`

@automvc automvc closed this as completed Aug 15, 2020
@automvc automvc added good first issue Good for newcomers and removed doing labels Aug 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant