类名 as 别名
类名后跟别名
作用:
a、调用时方便
b、Hibernate中最简单的查询是from Street ,只是简单地返回Street类的所有实例。
在很多时候可能需要为类设置别名(alias),因为我们可能需要查询其他部分引用Street。
from Street as   s
S是Street别名,通过as关键字指定,关键字as是可选的我们也可以写成如下形式:
from Street   s
也可以出现多个类
from Street as s,District as d

相关文章:

  • 2022-12-23
  • 2021-06-11
  • 2022-12-23
  • 2021-06-10
  • 2022-01-02
  • 2022-12-23
  • 2021-06-05
猜你喜欢
  • 2021-11-07
  • 2021-09-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案