added entity connection for photodb