In my typeorm query, I initially used the query builder like this:
getManager().CreateQueryBuilder(class_name_from_entity_file, 'xyz').select('column_name').where('active_status=1').execute()
While this method gave me the desired output, I was advised to use 'find' instead. So I updated my query to:
getManager().find(class_name_from_entity_file,
{
select:['column_name'],
where: {
active_status: 1
}
}
Surprisingly, both of these queries are producing the same result. Can you explain the difference between query builder and find? Also, could you please provide information on using findone as well?