# Does anyone know how to create this procedure structure within Hibernate?

**URL:** <https://discourse.hibernate.org/t/does-anyone-know-how-to-create-this-procedure-structure-within-hibernate/10453>\
**Category:** Hibernate ORM\
**Created:** [October 15, 2024, 5:20pm UTC](https://discourse.hibernate.org/t/does-anyone-know-how-to-create-this-procedure-structure-within-hibernate/10453 "2024-10-15T17:20:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thiago\_gogola](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/thiago_gogola/32/3524_2.png) [@thiago\_gogola](https://discourse.hibernate.org/u/thiago_gogola)\
**Post date:** [October 15, 2024, 5:20pm UTC](https://discourse.hibernate.org/t/does-anyone-know-how-to-create-this-procedure-structure-within-hibernate/10453/1 "2024-10-15T17:20:14Z")

</div>

I have the following procedure in an Oracle database:

```auto
PROCEDURE sp_table_off_t(
    p_cod_con IN t411cont.cd_cc%TYPE,
    p_cod_loj IN t411loja.cd_loj%TYPE,
    p_table_de_par IN T_TODAS_PAR_CAR,
    p_tip_cont IN CHAR,
    p_codigo_retorno OUT VARCHAR2
);

```

This procedure has a parameter of type `T_TODAS_PAR_CAR`, which is a custom type. The problem is that this type is actually a table:

```auto
CREATE OR REPLACE TYPE WEB."T_TODAS_PAR_CAR" IS TABLE OF OBJ_TODAS_PAR_CAR;

```

And `OBJ_TODAS_PAR_CAR` is defined as follows:

```auto
CREATE OR REPLACE TYPE WEB."OBJ_TODAS_PAR_CAR" IS OBJECT (
    co_car NUMBER(16),
    nu_con NUMBER(20),
    nu_ad NUMBER(3),
    id_crt_cgl VARCHAR2(1)
);

```

I tried using `@Struct`, but I wasn’t successful. Does anyone know how to do this?

---

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [October 17, 2024, 2:56pm UTC](https://discourse.hibernate.org/t/does-anyone-know-how-to-create-this-procedure-structure-within-hibernate/10453/2 "2024-10-17T14:56:25Z")

</div>

What did you try, which errors did you get? Please share code and stacktraces.
