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

ValueGenerators parsing and json schema changes #431

Merged
merged 2 commits into from
Aug 21, 2015

Conversation

paterczm
Copy link
Contributor

@paterczm paterczm commented Aug 4, 2015

Metadata changes for lightblue-platform/lightblue#22. Without sequences implementation in lightblue-mongo, this does nothing. It should be merged together with lightblue-mongo changes.

@paterczm
Copy link
Contributor Author

paterczm commented Aug 4, 2015

Uid fields are generated by UIDInterceptor. I think we can use interceptor for generating other values too, relaying on a db specific extension (similar to how LockingSupport extension).

@bserdar
Copy link
Contributor

bserdar commented Aug 4, 2015

So: a constraint that associates a sequence name with a field, and an
interceptor that generates values on insert/update, right?

On Tue, Aug 4, 2015 at 4:32 AM, Marek notifications@github.com wrote:

Uid fields are generated by UIDInterceptor. I think we can use interceptor
for generating other values too, relaying on a db specific extension
(similar to how LockingSupport extension).


Reply to this email directly or view it on GitHub
#431 (comment)
.

@paterczm
Copy link
Contributor Author

paterczm commented Aug 4, 2015

So: a constraint that associates a sequence name with a field, and an interceptor that generates values on insert/update, right?

Yes, except it's not a constraint, it's a generator (new keyword).

@bserdar
Copy link
Contributor

bserdar commented Aug 4, 2015

Ok, saw that.

In that case, you have to change SimpleField as well, add generators to it.

On Tue, Aug 4, 2015 at 8:02 AM, Marek notifications@github.com wrote:

So: a constraint that associates a sequence name with a field, and an
interceptor that generates values on insert/update, right?

Yes, except it's not a constraint, it's a generator (new keyword).


Reply to this email directly or view it on GitHub
#431 (comment)
.

@paterczm
Copy link
Contributor Author

In that case, you have to change SimpleField as well, add generators to it.

Why SimpleField and not Field? Field has constraints, so I would think it should have value generators as well.

@bserdar
Copy link
Contributor

bserdar commented Aug 17, 2015

If you add to Field, then arrays and objects will have generators as well,
but not array elements.

On Mon, Aug 17, 2015 at 6:07 AM, Marek notifications@github.com wrote:

In that case, you have to change SimpleField as well, add generators to it.

Why SimpleField and not Field? Field has constraints, so I would think it
should have value generators as well.


Reply to this email directly or view it on GitHub
#431 (comment)
.

@paterczm
Copy link
Contributor Author

Since we decided to use backend functionality to handle the sequence, I don't think the interceptor is needed. Value will be generated by the database and sequence defined by lightblue-mongo (or other backend with sequence support). For the same reason did not make any changes in LightblueFactory.

Had to add some dependencies between lightblue-core modules, pls verify.

* @author mpatercz
*
*/
public interface Sequance {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sequence, not Sequance

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed :)

@paterczm
Copy link
Contributor Author

Squashed commits to hide all the back and forth. Defined Sequence and SequenceSupport as generics (expecting one implementation per kind of sequence).

bserdar added a commit that referenced this pull request Aug 21, 2015
ValueGenerators parsing and json schema changes
@bserdar bserdar merged commit 11a00d5 into lightblue-platform:master Aug 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants