我有两个实体:
User
具有两个字段的实体是:id
(@id),username
Profile
具有两个字段的实体是:user
(@OneToOne,targetEntity="User"),fullname
但是,当我从阅读 JPA 书籍的内容中尝试查询时:
SELECT p from Profile p where p.user.username = 'john'
它提醒我一条消息:
[Syntax Error] line 0, col 55: Error: Expected =, <, <=, <>, >, >=, !=, got '.'