Displaying list of employees with multiple table joins(edited)

1.Client Side Validation for image uploading of employee
2.Validation for password field
2.Displaying list of employees joining multiple tables

View in hrm database


DELIMITER $$

USE `hrm`$$

DROP VIEW IF EXISTS `empdetails`$$

CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `empdetails` AS 
SELECT distinctrow
  `e`.`employeeId`        AS `employeeNo`,
  `d`.`firstName`         AS `firstName`,
  `d`.`lastName`          AS `lastName`,
  `t`.`title`             AS `title`,
  `es`.`employmentstatus` AS `employmentstatus`,
  `e`.`employeeId`        AS `empdetailsId`,
  `e`.`companyId`         AS `companyId`,
  `e`.`userId`            AS `userId`,
  `e`.`createDate`        AS `createDate`,
  `e`.`modifiedDate`      AS `modifiedDate`,
  `d`.`firstName`         AS `supervisor`,
  `su`.`name`             AS `name`
FROM ((((((`employee` `e`
        JOIN `emp_personal_details` `d`)
       JOIN `emp_job` `j`)
      JOIN `job_title` `t`)
     JOIN `employment_status` `es`)
    JOIN `sub_unit` `su`)
   JOIN `emp_supervisor` `esr`)

WHERE ((`e`.`employeeId` = `d`.`employeeId`)
       AND (`e`.`employeeId` = `j`.`employeeId`)
       AND (`j`.`jobTitleId` = `t`.`jobTitleId`)
       AND (`j`.`employmentStatusId` = `es`.`employmentStatusId`)
       AND (`j`.`subUnitId` = `su`.`subUnitId`)
       AND (`d`.`employeeId` = `esr`.`employeeId` ))$$

DELIMITER ;

service.xml

    <entity name="EmpDetails" local-service="true" remote-service="false"
		data-source="hrmDataSource" session-factory="hrmSessionFactory"
		tx-manager="hrmTransactionManager">
		
		<!-- PK fields -->
		
		<column name="empdetailsId" type="long" primary="true"></column>
		
		
		<column name="employeeNo" type="String"></column>
		
		<column name="companyId" type="long"></column>
		<column name="userId" type="long"></column>
		<column name="createDate" type="Date"></column>
		<column name="modifiedDate" type="Date"></column>
		
		<column name="firstName" type="String"></column>
		<column name="lastName" type="String"></column>
		<column name="title" type="String"></column>
		<column name="employmentstatus" type="String"></column>
		<column name="name" type="String"></column>
		<column name="supervisor" type="long"></column>		
		
		
		
	</entity>