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: 
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.
For those of you who came here from **IntelliJ** and still have not solved this or similar kind of `ClassNotFoundException` issue while working with **message queuing**; it is most likely that you are working on two, or more, different projects and, you may even have the projects under the same root but you are still getting this exception because these two, or more, projects are not set as modules of a single project in IntelliJ. Furthermore, to serialize and/or deserialize the objects RabbitMQ requires the same class, but you may have two similar looking classes in different projects.

To solve this issue, you can follow this trick:

1. Create a new empty project at the root folder that contains your "disjoint" projects.
2. IntelliJ will prompt you to import these projects into this empty project as modules; select the `pom.xml` or the `build.gradle` file to import them as such.
3. Press OK and the projects will be loaded under your previously empty project.
4. Now, all that's left is to group these modules. You can do this by following - [IntelliJ's Guide for Grouping Modules](https://www.jetbrains.com/help/idea/creating-and-managing-modules.html#group-by-qualified-names).
5. After grouping the modules you can (delete one, or more, of the classes from the different modules - leaving just one implementation of the class) import the required class from the required module by adding a Maven or Gradle dependency to the module.

*If you are using Maven then the dependency in you `pom.xml` file should look something like this:*

```xml
<dependency>
    <groupId>com.rabbitmq</groupId>
    <artifactId>commons</artifactId>
    <version>1.0-SNAPSHOT</version>
    <scope>compile</scope>
</dependency>

```