“from A where id= :id and date is null order by id from A where globalId = :globalId and date is null order by userid” 假如有这么两句hql不小心给拼在了一起(一个String 的object),请问怎么写一个正则来将两个语句提取出来呢? 跪谢谢谢谢谢谢谢谢~~
....恩,怪我表达能力差...就是一个字符串里有这么两句hibernate 的语句,然后现在想用正则来将两句hql分开[/quote]
你还是把原hql语句发出来吧,这样比较清楚[/quote]
第一句:from A where id= :id and date is null order by id
第二句:from A where globalId = :globalId and date is null order by userid
哪里不清楚.....A这种类名换成啥都不影响吧......