Auto generate FD based on Primary Key defined.

Signed-off-by: Benjamin <benchisa@gmail.com>