# Prefix db passing to repository class

**URL:** <https://discourse.laminas.dev/t/prefix-db-passing-to-repository-class/2144>\
**Category:** Components & MVC\
**Tags:** laminas-db\
**Created:** [March 1, 2021, 4:11pm UTC](https://discourse.laminas.dev/t/prefix-db-passing-to-repository-class/2144 "2021-03-01T16:11:32Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![kliker02](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@kliker02](https://discourse.laminas.dev/u/kliker02)\
**Post date:** [March 10, 2021, 9:36pm UTC](https://discourse.laminas.dev/t/prefix-db-passing-to-repository-class/2144/4 "2021-03-10T21:36:41Z")

</div>

Hello!  
Step1: You Can create 4 different repositories:

1. Table named as a\_products\_category,
2. a\_products\_info,
3. a\_archive\_products\_category,  
4.a\_archive\_products\_info;

Step2:Create service which copy data from tables to archive  
Step3: check in controller for product status and call service method

I’ll do that.

Anyway i think pass table name(prefix) as param is a bad way.

---

_[View the full topic](https://discourse.laminas.dev/t/prefix-db-passing-to-repository-class/2144)._
