Hi Eric, There are no big penalties, the only real problem is that edge schema is not validated because lightweight edges are not instantiated as ODocuments, so the validation does not run (eg. if you define a mandatory property on the edge class, it won't be validated with lightweight). For the class hierarchy, it's exactly the same as regular edges
We mainly suggest to use regular edges because it's easier to deal with real records, with RIDs and all the rest, rather than having to figure out if an edge is regular or lightweight, especially if you work with document API Thanks Luigi 2016-05-24 16:15 GMT+02:00 Eric24 <[email protected]>: > Thanks for the quick response and the clarification. So really, there > isn't any penalty for running with Lightweight Edges enabled, since they > will automatically be created as Regular edges when they have properties > (as long as you're aware of this distinction)? > > Also, when running with Lightweight Edges enabled, can a Lightweight Edge > still be a unique class derived from E (presumably with no *required > *properties > defined in the schema, but optional properties are OK)? > > --Eric > > > On Tuesday, May 24, 2016 at 8:59:11 AM UTC-5, Luigi Dell'Aquila wrote: >> >> Hi, >> >> By default all the edges are created as *regular* edges. >> >> This default can be changed from Studio or with an SQL statement >> http://orientdb.com/docs/last/Lightweight-Edges.html >> In this case, an edge is created as a lightweight edge only if it has no >> properties. When you add a property to a lightweight edge, it is >> automatically transformed to a regular edge >> >> Thanks >> >> Luigi >> >> 2016-05-24 15:55 GMT+02:00 Eric24 <[email protected]>: >> >>> Since this has changed since a lot of the documentation was written, I >>> want to get a definitive answer on how edges are handled in 2.2. Is it true >>> that any edge created will be a Lightweight Edge if no properties are >>> defined for it? Does this also apply to edge classes that derive from E or >>> only E itself? And what happens if you add a property to an edge that was >>> originally created without any--does ODB automatically "promote" the edge >>> from Lightweight to Regular? >>> >>> -- >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "OrientDB" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > > --- > You received this message because you are subscribed to the Google Groups > "OrientDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
