Question: I'm looking for the counterpart of Msql query:

```
SELECT per.*,add.addressDescription FROM Persons per 
       JOIN Address add ON per.AddressId = add.AddressId

```

I have this query:

```
    var query = persons.JOIN(address,per = person.addressId,add = addressId
    (per,add) => 
    new Persons{
                addressDescription = add.addressDescription,
                PersonId = per.PersonId,
                PersonFirstName = per.PersonFirstName
                PersonLastName = per.PersonLastName})

```

Is there a way to populate `Persons.addressDescription` without assigning individually the other properties of `Persons`? Imagine if `Persons` have 10 more properties. 

I would like to refrain from using loops like:

```
foreach(Person person in PersonList)
{
  foreach(Address address in AddressList)
  {
     if(person.addressId == address.addressId){
        person.addressDescription = address.addressDescription
     }
   }
}

```

Answer: 
In the code snippet you have registered jsonMessageConverter and at the same time you are making your Person.java serializable. You should either use serialization or the json approach. Moreover the problem lies in the package structure of Person.java. I encountered the same problem, resolved it by taking same package structure for the object being transferred in producer and consumer. The reason behind this is that while serialization, java takes class name , package structure and other information into account, so at the consumer side we need to have the same package structure.I encountered the same problem while using jsonMessageConverter. So from my viewpoint the solution to this problem is to package your message objects into a jar and add that jar as a dependency in your producer and consumer project.
When you use `rabbitmq`, you shoud keep your class in the same name package,
such as : `com.xxx.entity.Order`. If class is in a different package like `com.xxx.consumer.entity.Order``com.xxx.producer.entity.Order` it will throw errors.