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

ERXPartial should offer an init() method #602

Closed
paulhoadley opened this issue Aug 7, 2014 · 2 comments
Closed

ERXPartial should offer an init() method #602

paulhoadley opened this issue Aug 7, 2014 · 2 comments
Assignees

Comments

@paulhoadley
Copy link
Contributor

At the moment, ERXPartial defines awakeFromInsertion() for subclasses to override. This is then called on each of a base entity's partials by ERXPartialGenericRecord.awakeFromInsertion(). That's great, but there's a known bug with awakeFromInsertion() which is the reason for the existence of ERXGenericRecord.init().

This should be as simple as having ERXPartialGenericRecord.init() loop over its partial entities and call their implementation of init() in much the same way as ERXPartialGenericRecord.awakeFromInsertion() does for ERXPartial.awakeFromInsertion(). I'll test this out and see if it works.

@paulhoadley paulhoadley self-assigned this Aug 7, 2014
paulhoadley added a commit to paulhoadley/wonder that referenced this issue Aug 7, 2014
Here we add an init() method which subclasses (that is, partial
entities) can override. We also implement init() in
ERXPartialGenericRecord, and have it call init() on all the partial
entities it knows about. This works exactly the same way as
awakeFromInsertion(), for example.
@paulhoadley
Copy link
Contributor Author

I've opened a pull request for this (#603) if anyone wants to try it out or comment on it.

paulhoadley added a commit to paulhoadley/wonder that referenced this issue Aug 7, 2014
@paulhoadley
Copy link
Contributor Author

Fixed by #603.

jburzler pushed a commit to jburzler/wonder that referenced this issue Aug 13, 2014
# By John Huss (3) and others
# Via Ken Ishimoto (3) and others
* 'master' of https://github.com/wocommunity/wonder:
  Deprecates ERXPartial.awakeFromInsertion(). wocommunity#602
  Adds ERXPartial.init(). wocommunity#602
  Fix loading Resources/server.wsdd from a 'jar framework' (used to configure web services)
  Fix Ajax submits when deploying as servlet; Add ERXServletApplication class
  Fix loading of properties from jar bundles
  Issue wocommunity#587 fixed
  Making sure a SecurityException is always thrown when we aren't able to return an attachment.
  Improve documentation explaining why decoding is being done when and where it is. Refactor individual logic blocks (fetching the ERAttachment, evaluating if a request is legitimate) into their own methods to make code more digestible and better encapsulated.
  Fix for false security exception
  Fix for wonder-89: Don't attempt to save the parent EC of a new EO as none exists.
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