Add support for one-to-one link relations
In database design, there's often a need to have a record linked to only a single record in another library. For example, a library of exercise logs linked to a library of exercisers. -We'd like to ensure that only one exerciser can be linked to each exercise log; in effect, a one-to-one relationship from exercise log to exercisers (one-to-many from exercisers to exercise logs). Currently, it's only possible to form one-to-many relationships with Memento. Being able to define a link field that's only linked to one "foreign" library record would be very beneficial for many library suites.
-
Fran commented
Just installed the new update and tried out this new feature. It works great! Thank you very much!
-
musta krakish commented
I think what fran proposes is a good idea. The posibility of hide the button select once a single record is select, will be helpfull for many of us.
For instance, i have made a db to know how concrete products buy each customer i visit.
I add about 20 fields to select products one by one from another library and below each product i add a field named "quantity", so all i need to do is to in order to made an order for a client, is to ask them for the products i'm seeing in the screen and to ask for the amount of each one in case thay want to buy something.
Actually, i can do the same thing with link to library, but the dawmned button, usually lead to make mistakes.
Greetings to all. Especially to Bill Crews who is lways there to help me with my questions and doubts.
-
Davi Menezes commented
It is ridiculous that option does not exist! It's super convenient and necessary. It is ridiculous to have option to add more items which can not
-
Bill Crews commented
I might vote if I could see one or two classic examples of the use of one-to-one linking. Also, I presume the use would be zero or one entry to one entry. To support exactly one entry to one entry, one would hope for a way for creation of an entry in one library CAUSING the entry of the corresponding entry in the other.
-
Fran commented
Thanks for your comment, mukura. This is indeed exactly how I have my libraries linked, but there's nothing to prevent someone from inadvertently double linking entries. What I've done for now is to use the Field Hint to suggest to the user that they should link only one, but there's nothing to enforce it.
Note too my later comment that we need the same ability to restrict Image and Contact fields in the same way. It often doesn't make sense to have multiple images and/or contacts related to a record. And again let me stress that we need to be able to allow both cases. -Some libraries need to allow multiple contacts, etc. per record, and some need to restrict them to just 1.
-
Fran commented
A couple folks have commented that Memento used to work only this way. I'd like to clarify that this suggestion is for Memento to support *both* one to one *and* one to many relationships. We really need both! :-)
-
Pete commented
Yeah that's how it USED to work in older versions of Memento and I'd say the usefulness of "one to many" (and also "many to many") relationships that are now possible far outweigh the benefit of any one to one restrictions that the old version had.
While I agree that there should be an option in the library editing screen to say "limit to one entry" for all the field types that have the "many" possibility, I'd hate to see this functionality go away as it is actually one of the defining functions that makes Memento better than most of the other mobile database solutions out there.
-
mukura commented
Fran, this is how an older version functioned and it was a pain in the butt not being able to do one to many. I have many libraries and somehow I manage to link in the fashion you have described - perhaps it would be a case of reversing your link and in an Exerciser library having the linked library Exercises (which contains Link to entry>Exerciser) frim there you will have in your Exerciser library the ability to add Exercises.
I have a suite of libraries for client project site task mileage items etc and it works well to do it this way
client is parent to project
project is parent site (or vice versa)Project is parent to all other libraries mentioned.
-
Fran commented
BTW, this should also apply to Image and Contact fields, for the same reasons. -Anywhere the "select" button bar is displayed.
-
Fran commented
P.S. A simple way to think about this is that once a single record from the other library is selected, the button bar below the link field would no longer be available. That's all it would take! :-)