Regards,Do you have any input on the matter?The API for the getter would include some kind of database connection as the argument, as well as a hash (to request a single object) or an array of hashes (to request multiple objects).Would it be an idea to require a minimum number of methods and class methods to be implemented on a LedgerSMB::PGObject, like the ones above, but maybe also "save", "remove" (not delete, as that's a reserved word in Perl), ... (any others?)the database before the field checks happen)(because the getter will make sure that required values are retrieved fromreturning a new instance, we could start requiring fields in our classes* If the 'get()' method would be a class-level constructor (like new), alwaysobject.the database. However, this means we can't require any fields in the* The fact that the getter sets up the current instance makes me wantI'm thinking:In some cases, this 'get' method returns a new instance, in other cases, the getter initializes fields in the 'current' instance.Hi Chris,Could you help me with the following: our API for PGObject-based classes has only one constructor (the regular 'new' constructor). Many (but not all) classes can be passed a single 'id' value. The constructed object sometimes has a 'get' method.
to use the getter with the 'primary key' (id) to retrieve the object from
--
------------------------------------------------------------------------------ Announcing the Oxford Dictionaries API! The API offers world-renowned dictionary content that is easy and intuitive to access. Sign up for an account today to start using our lexical data to power your apps and projects. Get started today and enter our developer competition. http://sdm.link/oxford
_______________________________________________ Ledger-smb-devel mailing list ..hidden.. https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel