Skip to content
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

Best way of handling dependent metadata #25

Open
bakura10 opened this issue May 11, 2013 · 0 comments
Open

Best way of handling dependent metadata #25

bakura10 opened this issue May 11, 2013 · 0 comments

Comments

@bakura10
Copy link
Contributor

Hi,

I've came across the following use case and I'm not sure about how to solve it correctly : when I load a class metadata (for instance in loadMetadataFromFile for FileDriver), I need to get data defined by mapping that can possibly be defined by another file driver.

I then use the DriverChain. The problem is how to solve that? I've thought first to create the class metadata, and inject the class metadata into the different drivers so that I have access to it in the loadMetadataFromFile. The problem of course is that I need first to construct the drivers...

The second solution I've found is construct all the drivers, then create the class metadata, and then iterate through the drivers again and call a setter to set the class metadata factory.

What is the best way for that?

EDIT : In fact I think the best way is to create the FileDriverLocator to have all the dirs. So it's easier then.

EDIT 2 : but this won't solve the problem if people use both annotation and file drivers. So I still need to inject it to some point.

Thanks for your help !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant