Strapi CMS v4 - How to create a new Strapi Collection Types from an existing one - content-management-system

I am currently using Strapi CMS v4. I have created a Strapi CMS Collection Type (Collection Type A). I want duplicate Collection Type A and name it Collection Type B. Unfortunately, I cannot find any guidance on the Strapi website on how to do it. I can duplicate a content record within the same Collection Type, but that is not what I want.
Is it possible to create a new Collection Type from an existing one in Strapi v4?

Related

Unable to find other entity-type in Apache Atlas . Only Showing hdfs_path

Hi I am new to Apache Atlas . And I am facing a problem.
I want to create a hive_table entity type manually but in Entity type drop downs its showing only "hdfs_path"
Can anyone let me know how I can use a custom entity type in apache Atlas.
And can anyone provide me a good documentation part or tutorial apart form Apche Atlas site.
Here is the photo where I want to add a new entity type
TL;DR: you need to apply the following setting to atlas-application.properties, and restart:
atlas.ui.editable.entity.types=<your entity types>
Note that <your entity types> can be a comma-separated list, like hdfs_path,kafka_topic or, to just allow all Types to be created and edited via the UI, use a star *.
I guess the reason for this restrictive default is because metadata in Atlas is normally synchronised from other systems using hooks and bridges. So in order to keep the metadata "consistent" (i.e. prevent the risk of people creating metadata entries in Atlas which do not correspond to actual data assets existing in the referenced systems), by default editing Entity Types via the UI is locked down.
Reference: https://issues.apache.org/jira/browse/ATLAS-3237
hive_table entity should be synced using import scripts.
"hdfs_path" is not synced automatically unless they belong to lineage, hence the option to create them manually.
However, if you want to create them manually, please check the following link, which has the steps:-
https://community.cloudera.com/t5/Support-Questions/How-to-create-hive-table-entity-in-Apache-atlas-using-REST/td-p/173644

SugarCRM api (Rest Webservice call) for Database Schema

I am looking SugarCRM API (Rest Webservice call) for Database Schema.
Where can I get details of all the tables, entities, Column names, relationship available in SugarCRM?
I want to get Metadata. I have API's for CRUD operations but I want to find schema API.
Here is a list of available API calls for SugarCRM 7.
http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.5/API/Web_Services/Examples/v10/index.html.
Here is a link for the database scheme.
http://apidocs.sugarcrm.com/schema/7.6.1.0/ent/
As far as I know there isn't a schema API. To get all fields (core and custom) for a module you'd have to query 1 record to retrieve the fields list.
I have found one API for retrieving schema.
Using this URL " {site url}/rest/v10/metadata"
we can get schema for all the tables available in SugarCRM in one shot.

Yii2- Failed to create Mongodb models using Gii

I can't create MongoDb models using Gii module code generator. Gets the below error :
Unknown Method – yii\base\UnknownMethodException
Calling unknown method: common\components\MongoConnection::getTableSchema()
Gii should not be used to create MongoDB Models.
MongoDB documents may change from one to another and there is no "collection definiton", as oposed to "table schemas" where you can get all column names and types.
This is the reason why a model cannot be created automatically and should be created manually.
There is a Gii component to help you generate MongoDB ActiveRecords.
Here's a little YouTube video that shows you exactly how it modify Yii2 configuration, create an active record and generate a CRUD controller.
http://www.youtube.com/watch?v=1urmws7hz5Q

Changing the MongoDB collection on run time in symfony2 + doctrine

I'm using Symfony2 MongoDB + Doctrine and I want to tell doctrine to save my objects in collections with different name from the name of the class that defines the object. Also the name of the new collection should be the id of an object in different collection. For example I have a class called Posts and I want to save them in a collection named after the ID of the user in the original User collection. This means that I need to tell doctrine to save all new posts in a collection named e.g. User555 and I should be able to tell doctrine to create this collection and save there during runtime.
I can see that I can change the name of the collection statically with configuring it in the files like here: Storing a document in a different collection - Mongodb with symfony2
But I need to be able to create collections at runtime.
I will be thankful if someone points me in the right direction!
Cheers.
When you use the ORM you can do
$em->getClassMetadata('\AcmeBundle\Entity\Something')->setTableName('test')
Using the ODM you should be able to do
`$dm->getClassMetadata('\AcmeBundle\Document\Something')->setCollection('test')
I looked through the Doctrine code and it's possible. However note that by doing this you're changing the collection used for that Document for the life of the script, unless you set it back.
I don't know of any reasonable way to do this for just one entity at a time. Probably would be best to wrap the ODM by creating your own persister service.

Grails GORM MongoDB. Issue with parent model classes

Background: I am using the GORM plugin for MongoDB in Grails.
Problem:Say that I have two domain classes A and B. B extends A. If I execute B.save() the plugin will create a collection named A in MongoDB. What am I supposed to do to get the plugin to create the collection B?
Many Thanks,
Alex
It should create collection B in the database.
Can you provide more info, definition of A and B classes?