Graphcms what's Use as title field - graphcms

I don't understand what's it for
Use as title field in graphcms model.
Could you explain to me a give me an example, please?
Thanks

"Displays this field's value instead of the ID in relations"
By default, it shows id in relation.
After setting a field as the title of a model
it shows the value of the "title" field in relation.

Related

Security of Hidden ID in Views

for editing a data in views we should specify an "Id" to submit to out controller. but imagine that user manually change "Id" value. for example Id=10 change to Id=15 (by some tools in browser like Inspect). in this case EF update data with Id value 15 and trick our application. what is the best solution to overcome this issue?
My Solution:
in each domain class create a property named "UniqueId" as string type and when we add data to database, this property must be valued with GUID besides "Id" value. now when we send view to user UI we must send both property "Id" & "UniqueId" as hidden, then when client post data to controller for update, our logic section shall check "Id" & "UniqueId" both together and if any nonconformity existed, we can throw exception.
please help for this issue and mentioned solution. thanks

Symfony2.8 ChoiceType form filed with TextType form field

In Symfony 2.8 when I edit or create a user, I create the UserType form to render all fields.
The UserType form has an Roles field which I get all roles and render it like checkbox.
The question is our boss want to add an input field at every each roles on the right.
The red color I marked section is the needed input section
.
In this way our boss can edit the input text box so that he can see more clearly every role's meaning.
How can achieve this?
One solution is to move Roles to DB and store them as other entities. In such scenario you will need Role entity with at least two properties:
name
description

Using custom property in WHERE IN clause with $X{} in Jasper Reports

I currently have a parameter called countries of type java.util.List and I'm using it in a WHERE IN clause as follows:
AND $X{IN, rd.country_id, countries}
In my app I must convert my List<Country> to List<Integer> so that I can use it to make the IN clause, otherwise Jasper would create something like country_id IN ("Argentina", "Brazil") instead of using the IDs.
I was wondering if its possible to use List<Country> as my parameter and telling $X{} to use the field id to create the IN clause so that I can use the toString() method to show what countries the user has selected, any idea? thanks
One method i can think of right now is to have a java class which will take your List of type countryname and return List of type countryId .
you have to make another parameter of type List.This parameter will call the java method.and then you can use this parameter in you query
I assume that the answer provided by #Lisa is not working in this case.
Edit:
Place the java class in your project classpath
The "<>" tags were not visible
I'm not sure how you're deploying this report, but could you set the input control's visible column to the country name, but set the value column to the country ID?
If you're unable to edit the input control, what about modifying your query to handle the country name to ID conversion?
SELECT *
FROM myTable
WHERE countryID IN (SELECT countryID
FROM countryTable
WHERE $X{IN, countryName, countries}
)

show many to many relationship field label in symfony2

I have an entity News bound to an entity Company with a many to many relationship.
Such relationship is set in a form through an entity field where I can select companies tied to my news.
Everything works fine except that company ids are showed as labels.
Is there a way to force another and more meaningful table field is showed as a label?
Have look at entity form field type reference. Specifically property option.
http://symfony.com/doc/current/reference/forms/types/entity.html#property

ADO.NET Entity Data Model - Duplicates

How can I add a Unqiue index to a column like in SQL, so it wont allow duplicates in the column?
Double click your EDMX file. the entity model designer gui comes up.
Add one or more Entities if you don't have any already.
Select a field in an entity, and double-click it. The field property window should open up.
Select the property "ENTITY KEY" and set it to True.
As far as I understood, this makes the field unique.
Cheers,
G.