I가 다음과 같은 관계 :선택 CakePHP의
User
hasMany의UserNotification
Notification
hasMany의UserNotification
UserNotification
belongsTo를User
,Notification
notifications
테이블이있다 다음 열 :,subject
,content
users_notifications
테이블에는 다음과 같은 열이 있습니다id
,user_id
,notification_id
의UsersController
에서status
, 어떻게 한 사용자에서 모든 알림을 검색 할 수 있습니다? 즉, 각 통지마다 이러한 모든 세부 정보 (주체, 내용 및 상태)를 의미합니다.
또한 반환 할 필드 수를 어떻게 제한합니까? UsersController에서 요청할 때 find() 배열의 User 모델에서 필드를 검색하지 않으려합니다.
감사합니다. UsersController에서 알림을 검색하기 위해
있습니다. 고맙습니다! – linkyndy