Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关联对象查询 sql语句正常但是返回NullPointerException #81

Open
lize240810 opened this issue Dec 12, 2020 · 2 comments
Open
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@lize240810
Copy link

lize240810 commented Dec 12, 2020

image

关联查询出现了java.lang.NullPointerException

  1. 进行一对多查询时报null指针异常
Member.queryAll(Member.HAS_MANY_ORDERS);
  1. 查询之后日志打印的sql可以直接放到数据库查询
SELECT * FROM users_login_logs WHERE  user_id IN (1,17,18)

我做的尝试

  1. 检查数据库字段与类属性是否拼写错
    1. 数据库与类对应
  2. 单表分别查询(都没问题)
@catchex catchex self-assigned this Dec 13, 2020
@catchex catchex added bug Something isn't working enhancement New feature or request labels Dec 13, 2020
@oliviaour
Copy link

我看了代码,应该是从表中外键字段没有导致的错误,异常信息不够明确。

@catchex
Copy link
Member

catchex commented Dec 13, 2020

OK,需要更明确的异常提示

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants