The problem is that instead of "product", it returns "ownProduct" from R::exportAll(). Since the 'own' or 'xown' is only a prefix for one-to-many convention, shouldn't that be removed in the export? Is there a way to get the correct attribute name ("product") during export?
gabor
unread,
Sep 16, 2015, 5:09:30 PM9/16/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to redbeanphp
Hi,
Welcome to the RedBeanPHP forum.
To answer your question:
The current approach has the following advantages:
1. No conflicts: you can have 'product' and 'ownProduct' side-by-side 2. Predictable: the key tells you something about the list 3. Consistency: same structure as beans, i.e. property 'ownProduct' translates to 'ownProduct' 4. Readability (subjective): the relations are easy to spot 5. Implementation: there are several powerful features associated with the implementation, however to benefit from those we need the 'same' keys as the beans