Skip to content


Visibility of fields #469

Meijuh opened this Issue · 1 comment

2 participants


Is it possible in propel to define visibility of fields, thus instead of public, make a field protected? Private is of course of no use.

One can imagine the following situation.

A table has 2 fields. Both fields can either be NULL or have an arbitrary value. Thus for the sake of argument say the table can have 4 possible types {(NULL, NULL), (NULL, value), (value, NULL), (value, value)}. But I never want (NULL, NULL) to be a possile type of value(s). This means that the two methods setting the two values should NOT be public, but protected. Then three public methods can be written in the subtype of the BaseTable class representing the table. Each of the methods enable one of the three allowed value combinations. As a result the controller can only enable three of the four possible value combinations.

I could not find a visibility option in schema.xml (, or is it there already? If not, do you agree that this is a nice feature?


It's not possible yet. You should open a feature request in propelorm/Propel2.

@willdurand willdurand closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.