Persistence with Doctrine does not take Object data to Insert

Asked

Viewed 49 times

2

I started a new PHP project where every database has tables and their columns with different class names and attributes.

With the intention of winning in the productivity of not being renamed I decided to apply the Doctrine ORM (I have no experience with it), however I am with the following problem.

<?php  

/**
 * Entity
 * Table(name="usuario")
 */
class Usuario {...}
  • Just a tip for using the site: use the title to describe the problem, that lot of tags is just noise; the site uses the tag system to sort the content; the lack of the PHP tag makes the code not appear colored. In fact, it seems that you put the main tags in the title and the secondary tags as real tags; the lack of the main tags makes it difficult for the experts of those tags to find your question.

  • Hello dear friend, thank you for the tips. Changes made. TKS!

1 answer

0


Good afternoon Gentlemen.

I identified the regrettable error.

Notice the mapping:

/** * Entity * Table(name="user") */ class Usuario {...}

The "@" was missing before. Due to replacing IDE text I ended up not realizing this and the error pointed out was not explicit.

So it was like this:

/** * @Entity * @Table(name="user") */ class Usuario {...}

Thank you all.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.