{"action":"created","issue":{"url":"https://api.github.com/repos/joel-costigliola/assertj-core/issues/412","labels_url":"https://api.github.com/repos/joel-costigliola/assertj-core/issues/412/labels{/name}","comments_url":"https://api.github.com/repos/joel-costigliola/assertj-core/issues/412/comments","events_url":"https://api.github.com/repos/joel-costigliola/assertj-core/issues/412/events","html_url":"https://github.com/joel-costigliola/assertj-core/issues/412","id":75323076,"number":412,"title":"Feature Request: compare objects of different types field/property by field/property","user":{"login":"PascalSchumacher","id":2707245,"avatar_url":"https://avatars.githubusercontent.com/u/2707245?v=3","gravatar_id":"","url":"https://api.github.com/users/PascalSchumacher","html_url":"https://github.com/PascalSchumacher","followers_url":"https://api.github.com/users/PascalSchumacher/followers","following_url":"https://api.github.com/users/PascalSchumacher/following{/other_user}","gists_url":"https://api.github.com/users/PascalSchumacher/gists{/gist_id}","starred_url":"https://api.github.com/users/PascalSchumacher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PascalSchumacher/subscriptions","organizations_url":"https://api.github.com/users/PascalSchumacher/orgs","repos_url":"https://api.github.com/users/PascalSchumacher/repos","events_url":"https://api.github.com/users/PascalSchumacher/events{/privacy}","received_events_url":"https://api.github.com/users/PascalSchumacher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-11T18:57:25Z","updated_at":"2015-05-11T21:08:16Z","closed_at":null,"body":"```java\r\nclass Person {\r\n\tString firstname, lastname;\r\n\r\n\tpublic Person(String firstname, String lastname) {\r\n\t\tthis.firstname = firstname;\r\n\t\tthis.lastname = lastname;\r\n\t}\r\n}\r\n\r\nclass PersonDAO {\r\n\tString firstname, lastname;\r\n\tLong id;\r\n\r\n\tpublic PersonDAO(String firstname, String lastname, Long id) {\r\n\t\tthis.firstname = firstname;\r\n\t\tthis.lastname = lastname;\r\n\t\tthis.id = id;\r\n\t}\r\n}\r\n\r\nPerson person = new Person(\"John\", \"Doe\");\r\nPersonDAO personDAO = new PersonDAO(\"John\", \"Doe\", 1L);\r\n\t\t\r\nassertThat(person).isEqualToObjectOfOtherTypeComparingFieldByField(personDAO);\r\nassertThat(personDAO).isEqualToObjectOfOtherTypeIgnoringGivenFields(person, \"id\");\r\n```\r\n\r\nNames of the assertion methods could probably be improved."},"comment":{"url":"https://api.github.com/repos/joel-costigliola/assertj-core/issues/comments/101047435","html_url":"https://github.com/joel-costigliola/assertj-core/issues/412#issuecomment-101047435","issue_url":"https://api.github.com/repos/joel-costigliola/assertj-core/issues/412","id":101047435,"user":{"login":"joel-costigliola","id":382613,"avatar_url":"https://avatars.githubusercontent.com/u/382613?v=3","gravatar_id":"","url":"https://api.github.com/users/joel-costigliola","html_url":"https://github.com/joel-costigliola","followers_url":"https://api.github.com/users/joel-costigliola/followers","following_url":"https://api.github.com/users/joel-costigliola/following{/other_user}","gists_url":"https://api.github.com/users/joel-costigliola/gists{/gist_id}","starred_url":"https://api.github.com/users/joel-costigliola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joel-costigliola/subscriptions","organizations_url":"https://api.github.com/users/joel-costigliola/orgs","repos_url":"https://api.github.com/users/joel-costigliola/repos","events_url":"https://api.github.com/users/joel-costigliola/events{/privacy}","received_events_url":"https://api.github.com/users/joel-costigliola/received_events","type":"User","site_admin":false},"created_at":"2015-05-11T21:08:16Z","updated_at":"2015-05-11T21:08:16Z","body":"Maybe we should just relax the check on objects being of the same class in `isEqualToComparingFieldByField`, after all one might say that if you compare fields/properties the actual type is not really relevant."}}