-
Notifications
You must be signed in to change notification settings - Fork 57
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
Business rule fail doesnt cause save to cancel #13
Comments
Can you try with forkEventDispatching = false ? |
forkEventDispatching = false fixes the debugging issues thanks! I did nothing but edit server.js to mongoDb on the host and the server.js modifications are below. I have the latest of all the npm modules. I am developing on a windows box using WebStorm. var repository = require('viewmodel').read; var options = { repository.init(options.repository, function(err) { |
Just to clarify (it was a bit confusing) the forkEventDispatching = false fixed the debugging issue but the business rule issue is still outstanding. Even though the business rule doesnt pass, the save still occurs. S |
In the next few days I hope to look at it... sorry... I'm under pressure at the moment... :-( |
No worries :) Just re-read my post and I was a little unclear. I'll take a look this weekend as well. |
ok try with latest release v0.5.3 |
I get the following error... "Error: Callback was already called." |
Please check if you call the callback twice in the business rule... If it's like the above code snipped it will call it twice... |
Oops ya sorry my bad. The fix is good! |
This code looks great. I've spent the day digging into it but do have a couple issues:
I took an exact copy of the sample and changed itemBusinessRules as follows in the code below. All I did was add a rule that you cant add text that already exists.
Also according to other people, debugging with WebStorm seems to break the functionality. Has anyone else solved this? Its a real pain to not have debugging.
Thanks,
Sean
PS I added the code to init the repository in the domain server.js
PSS I took Udis course a couple years ago. Is the idea to have a separate node instance per AC or is it ok to have multiple aggregates in the same application. I only really have one component that I need to scale like crazy and am ok having the rest on the same node.
var repository = require('viewmodel').read
, itemRepo = repository.extend({collectionName: 'item'});
module.exports = {
itemAggregate: [
]
};
The text was updated successfully, but these errors were encountered: