# |
Mar 12th 2019, 15:18 |
jeremyharris |
you want char(36) |
# |
Mar 12th 2019, 15:18 |
half2me |
but when I create a new entity and save, it stays null |
# |
Mar 12th 2019, 15:17 |
half2me |
its a varchar(36) |
# |
Mar 12th 2019, 15:17 |
half2me |
my uuid field is just null |
# |
Mar 12th 2019, 15:17 |
jeremyharris |
you shouldn’t need to do anything in initializeSchema |
# |
Mar 12th 2019, 15:17 |
half2me |
but it doesn't seem to be generating one automatically |
# |
Mar 12th 2019, 15:16 |
half2me |
@jeremyharris I even tried setting the column type to uuid manually in the initializeSchema |
# |
Mar 12th 2019, 14:13 |
half2me |
alright, I'll try that, thanks @jeremyharris |
# |
Mar 12th 2019, 14:12 |
jeremyharris |
and if you want to validate your keys, using `uuid` in validation will do the trick |
# |
Mar 12th 2019, 14:11 |
half2me |
haha yes, a bit minimal |
# |
Mar 12th 2019, 14:11 |
jeremyharris |
yeah that’ll be good |
# |
Mar 12th 2019, 14:11 |
jeremyharris |
I just realized that section doesn’t say much hah |
# |
Mar 12th 2019, 14:11 |
half2me |
I think I have my migration as 'string' with char(36) |
# |
Mar 12th 2019, 14:11 |
half2me |
sweet |
# |
Mar 12th 2019, 14:11 |
jeremyharris |
if you generate a migration with bake using the “uuid” abstract type, it will do the work for you. If not and using mysql, char(36) will make cake recognize it as a uuid |
# |
Mar 12th 2019, 14:10 |
jeremyharris |
yep! see: https://book.cakephp.org/3.0/en/intro/conventions.html#database-conventions |
# |
Mar 12th 2019, 14:09 |
half2me |
validation etc. |
# |
Mar 12th 2019, 14:09 |
half2me |
Things I would need are automatic generation of uuid on saving an entity |
# |
Mar 12th 2019, 14:09 |
half2me |
Hi all, is there any documentation on how to use the uuid type? https://api.cakephp.org/3.7/class-Cake.Database.Type.UuidType.html |
# |
Mar 12th 2019, 13:58 |
ricksaccous |
you'd have to post your validation for me to be able to help |
# |
Mar 12th 2019, 13:58 |
ricksaccous |
that's completely different |
# |
Mar 12th 2019, 13:58 |
om.axisweb |
i get error Warning (2): mb_strlen() expects parameter 1 to be string, array given [CORE\src\Validation\Validation.php, line 867] |
# |
Mar 12th 2019, 13:53 |
ricksaccous |
woohooo |
# |
Mar 12th 2019, 13:53 |
ricksaccous |
i got addNested to work btw |
# |
Mar 12th 2019, 13:51 |
om.axisweb |
okay i try |
# |
Mar 12th 2019, 13:50 |
ricksaccous |
and please read what i sent earlier |
# |
Mar 12th 2019, 13:50 |
ricksaccous |
please read patchEntity documentation |
# |
Mar 12th 2019, 13:50 |
om.axisweb |
i am new on cakephp from last 4 days |
# |
Mar 12th 2019, 13:49 |
om.axisweb |
how to ? |
# |
Mar 12th 2019, 13:49 |
ricksaccous |
also you should specify associated => in patchEntity |
# |
Mar 12th 2019, 13:48 |
ricksaccous |
you'd realize it would need to be enclosures._ids |
# |
Mar 12th 2019, 13:48 |
ricksaccous |
also if you read what i posted |
# |
Mar 12th 2019, 13:48 |
ricksaccous |
are you converting to entity? |
# |
Mar 12th 2019, 13:46 |
om.axisweb |
:weary: |
# |
Mar 12th 2019, 13:40 |
om.axisweb |
save to in one field |
# |
Mar 12th 2019, 13:40 |
om.axisweb |
i need [enclosures] => Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 ) |
# |
Mar 12th 2019, 13:39 |
slackebot |
[0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 ) [street_address] => gfergh egg hpghg; [landmark] => 6546576 [city] => sardarshahar [pincode] => 333245 [district] => churu [state] => rajsthan [country] => india [add_by] => 1 ) |
# |
Mar 12th 2019, 13:39 |
slackebot |
[mother_name] => test 2 [mother_occup] => doctor [mother_qual] => MBBS [mother_mob] => 45465576787988 [income] => 2 lak [dob] => 2001-27-02 [gender] => m [blood] => A [medium] => english [identity_card] => 12343556677889 [identity_number] => 4556767989809 [community] => obc [differently_abled] => 1 [email] => dhanpat.saran@gmail.com [mobile] => 766565767787 [enclosures] => Array ( |
# |
Mar 12th 2019, 13:39 |
om.axisweb |
Array ( [school_id] => 1 [session_id] => 1 [class_id] => 1 [section_id] => 6 [stream_id] => 1 [subject_id] => 2 [export_type] => 1 [vehicle_no] => 4335656767878 [enrollment_no] => 3243568787898 [name] => Neharu Pubilc School,Sardarshahar [father_name] => test 1 [father_occup] => teacher [father_qual] => MA,BAED [father_mob] => 22343567688 [father_address] => test address father |
# |
Mar 12th 2019, 13:39 |
om.axisweb |
when i post form data exit by print than get like this => |
# |
Mar 12th 2019, 13:38 |
om.axisweb |
my save method here |