我有两个实体:
A id bigint auto_inctement b_id bigint B id bigint date timestamp
和代码:
// Client rectangle in screen coordinates
Rectangle rc = MyControl.RectangleToScreen(MyControl.ClientRectangle);
// Let's align context menu (its width) to bottom of the control
MyContextMenuStrip.AutoSize = false;
// Depending on actual dropdown control you may want align either via
// Width = rc.Width;
// Or
// ClientSize = new Size(rc.Width, someHeight);
MyContextMenuStrip.Width = rc.Width;
// Let's show context menu at the bottom of the control
MyContextMenuStrip.Show(new Point(rc.Left, rc.Bottom));
如何正确接收b.getDate()? (没有懒惰="渴望")
答案 0 :(得分:1)
在会话结束后尝试获取数据时,您可以尝试使用:
Hibernate.initialize(b.getDate())