-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Annotations #29
Comments
Agreed. Perhaps introduce a new annotation to determine which columns should be exposed via the API, so that we don't accidentally blurb out sensitive information (like passwords). For instance Example entity: /**
* @Entity
*/
class User
{
/**
* @Id
* @Column(type="integer")
* @GeneratedValue
* @ApiExposable
*/
private $id;
/**
* @Column(type="string")
* @ApiExposable
*/
private $username;
/**
* @Column(type="string")
*/
private $password;
/**
* @Column(type="string")
*/
private $email;
} (Disclaimer: Passwords should never be in any In the above example, only columns On a related note: The class metadata can be used to automatically find $meta = $em->getClassMetadata(get_class($entity));
var_dump($meta->getIdentifierFieldNames()); |
It should just work without annotation, so it would be better with |
Would it be possible to have annotation support? That would make it a lot easier to write the relationship mapping, you could simply do it in your doctrine entities.
The text was updated successfully, but these errors were encountered: