@ManyToOne
@ManyToOne(fetch = LAZY)
@ManyToOne(fetch = EAGER)
我想查询以@ManyToOne结尾而没有任何参数的所有行。我该怎么做?
答案 0 :(得分:1)
使用以下正则表达式:
@ManyToOne$
E.g。在C#中:
Regex rgx = new Regex("@ManyToOne$");
Console.WriteLine("Matches: " + rgx.IsMatch("@ManyToOne(fetch = LAZY)")); //Matches: false
Console.WriteLine("Matches: " + rgx.IsMatch("@ManyToOne")); //Matches: true