Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

added simple_array type #143

Merged
merged 3 commits into from May 27, 2012

Conversation

Projects
None yet
4 participants
Member

schmittjoh commented May 7, 2012

No description provided.

This pull request fails (merged 44cd77f into fc3ead2).

Member

stof commented May 7, 2012

This type should be registered as a commented type to avoid weird updates (as the field would be detected as Text otherwise when inspecting the DB)

Member

schmittjoh commented May 7, 2012

Not sure I understand what you mean.

Member

schmittjoh commented May 7, 2012

This seems like an architectural problem, or how would a custom type register itself a such a type?

Member

stof commented May 7, 2012

@schmittjoh custom types can register themselves as commented types (there is another method for this in the platform), and DoctrineBundle marks custom types as commented by default now (not in 2.0).
And the architecture is indeed not optimal (you have to register types twice: once in the Type class and once in the platform). This is on @beberlei's todo-list AFAIK

Member

stof commented May 20, 2012

@schmittjoh you should update the PR to register the type as commented one.

Owner

beberlei commented May 27, 2012

@schmittjoh in AbstractPlatform#initializeCommentedDoctrineTypes()

This pull request fails (merged 2d183ac into fc3ead2).

Member

schmittjoh commented May 27, 2012

@beberlei, updated

I've also added a JsonArrayType which I found quite useful in practice.

This pull request fails (merged 1760be6 into fc3ead2).

Owner

beberlei commented May 27, 2012

Why not just JSON? Since it can be an json array or object?

Member

schmittjoh commented May 27, 2012

array refers to the PHP type which is converted to JSON, i.e. we are not creating stdClass objects.

I think it makes sense, no?

Owner

beberlei commented May 27, 2012

Ah, yes, makes sense.

@beberlei beberlei added a commit that referenced this pull request May 27, 2012

@beberlei beberlei Merge pull request #143 from schmittjoh/simpleArrayType
added simple_array type
e537745

@beberlei beberlei merged commit e537745 into doctrine:master May 27, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment