0 votes

For adding new fields I find editing my entities in PhpStorm is faster than using Skipper (I use Doctrine2 and annotations).

For adding relations and visualising them Skipper is far easier.

Can we have better support for exporting and importing, and keeping in sync? I have spotted a couple of problems:

  1. When I use "File > Import to Project > Import ORM Schema File" the new fields are imported, but are added to the bottom of the entity in Skipper, not in the order they are in the code.

    Example: I exported the SampleEntity that Skipper creates when first run.
    In my code editor I added fields "email" and "phone". I added the fields after "name" and before "created_at".

    When reimported to Skipper, they were placed at the bottom:
    New fields at the bottom
    which is not where I meant them to be!

    1. If I remove fields in my code and reimport into Skipper, these fields are not removed from the entity

    Example: I deleted "email" and reimported the ORM schema. "email" was not removed.

To be able to synchronise the changes in both directions would be extremely useful.

in Solved by (780 points)
recategorized by

1 Answer

0 votes

Unfortunately no, this is not possible and it's not how Import is mean to be used. Import is only for initial import.

The issue with repetitive import is that there is no way how to correctly keep all things in sync.

One example is what you already figured out. When importing deleted entity, there is no easy way how to decide if this entity was added to Skipper or removed from the code.

The event worst thing is all arrays/lists/sets ORM variables where is very difficult to correctly merge such values.

The issue is that there are so many items which don't have unique identifiers and because of that it's difficult to merge/re-import it.

We already tried to implement this feature some time ago but we decided to reject it because of these reasons.

It's much better to improve editing in Skipper than implement re-import feature. We already implemented lot of copy&pastes of all entities, standalone fields between entities, etc.

In case you miss anything, feel free to write your use case and we can try to improve editing in Skipper.

by Skipper developer (141k points)

Thanks, that makes sense.

The major issue I've had today when adding new fields is I do not seem to be able to pick where to insert it, so I always have to use the arrows to move it to the right place.

Is there a way to select an existing field, then click the "+", and have it insert the new field above/below the selected field? I have tried single clicking the existing field, double clicking -- to no avail. My new field is always added at the bottom.

CTRL+INS should do the trick (it's also documented in button tooltip).

And regarding fields,we just finalizing new feature - field templates : https://twitter.com/i/status/1088700721514639361

Skipper will be shipped with default templates but you will be able to add also your own one. Template can contain one or more fields.