Comments (3)
Interesting feature/idea!
I think we have to implement this as a new parameter referencedBy
(or something like that). Valid values could be a positive int to limit the references from this kind or -1 for infinity.
Maybe we need several severities for this:
- Reference only n-times with the same using-skel-values
- or only n-times in general, independently from the using-skel-values.
The validation could count the entities in the viur-relations kind with the actually src-kind and dest-relation - this should be straightforward, or not?
from viur-core.
Not sure what you actually trying to archive. You have Kind A and B, both with entities a and b. You add relations from Entity A-a to entities B-a and B-b. Do you want to prevent another entity like A-b to also reference any of B-a and B-b? Then use unique with SameValue. Or do you want to prevent A-a from referencing B-a twice within the same relation? Then just add an test to interBoneValidations.
from viur-core.
@tsteinruecken please provide an example for this. I just want a relationalBone, where only one relation can be created for each target entity. E.g. in a userBone(), I currently can select the same user twice. This should be avoided by this bone, which either accepts the entry when it's currently not linked, or either replaces or rejects it when it's already there.
from viur-core.
Related Issues (20)
- Indentation Errors in Documentation Build HOT 1
- PEP 257 Standards in DocStrings HOT 1
- Improve `update_relations=True` to be "more intelligent"
- Evaluate `AlloyDB (Postgre-SQL-based) ` as SQL-based mirror database
- Implement `MessagePack` renderer
- `BaseBone.isInvalid()` broken and incomplete HOT 1
- Check and rewrite viur-core "bones" documentation HOT 1
- Check and rewrite viur-core "prototypes" documentation
- Check Bone Doc Strings
- Clean out the auto-api errors and warnings HOT 1
- get rid of the catch all index behavior at least in api calls
- Extend `DateBone` to allow for time values with microseconds
- Implement more second factors
- Fix securitykey header
- SEO-Features not working properly with umlauts HOT 1
- Replace `str.replace`-cascades by `str.translate` calls
- `conf["viur.email.transport"]` with class instances for custom adapter configuration
- 2nd factor login wishlist HOT 1
- Derives for FileBones not working in RelSkels HOT 1
- Make the second factor selectable. A user should not be forced to use the first one. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from viur-core.